Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Printer.Papersize = VbPRPSUser?


Hi,

I've read this in the MSDN:

Quote:





Originally Posted by MSDN


Note The effect of the properties of the Printer object depends on the driver supplied by the printer manufacturer. Some property settings may have no effect, or several different property settings may all have the same effect. Settings outside the accepted range may or may not produce an error. For more information, see the manufacturer's documentation for the specific driver.




but is there another way to print something using custom papter size? When I try to print something on my printer it returns me an error message. Is there another command except "vbPRPSUser" or if the printer doesn't support this, there is no way to use custom paper sizing?

Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Printer.papersize - Help!
I want to override the Printer settings and Set the Papersize to a
custom setting (Ex. Hight=17633 and Width=11963 ),value are in twips.
Maybe the printer driver not alowed this kind of operation.
Please help!

Printer Papersize
How do you find all of the available papersizes for a selected printer?

I have created a printer selection form and want the users to be able to change the papersize for the selected printer.

Printer.Papersize
Does anyone know how to set the page size of the printer. i tried doing printer.pagesize = A4 , but that did not work. so yeah if anyone has any idea on how to getthis to work would be sweet

Help On Printer Papersize
id like to set the default printer papersize to A3.. any one willing to help? Thanks!

Printer.PaperSize...?
How does printer.papersize work?

Is there a way to configure an A4 paper to print on it twice? I mean, half something and half something different?

Thanks.

Using Printer.PaperSize
The code below should be simple but when this property is set the error 484 is raised.

Printer.PaperSize = vbPRPSUser

So, my question is: How to change the Paper Height and Width from VB5.

Thanks in advance.

Printer.PaperSize
Hello,

Does anyone know all the Printer.PaperSize members are? I only know one, vbPRPSA4. does anybody know what others are there, I need a
landscape print of papersize of 8.5 inches by 12 inches.

Thank You

Set Printer.papersize
I'm trying to set the papersize property knowing only the name of the paper, (ie 11x17). Is there a way determine what .papersize valve is associated with each paper name for a given printer ??

Many thanks for any suggestions !

Printer Papersize Problem
hi! i have search previous forums post, books, and even msdn. still, i couldn't find the answer.

i want to change paper size into half the size of a short bond paper, i.e. 8 1/2 x 5 1/2. now i change the printer settings - papersize = custom; width and height. i couldn't get the correct results.

i've set the printer to be read/write and when i try tracing over my code inserting a breakpoint to the line that changes the papersize, it doesn't really change. what seems to be the problem????

all the other resources says the same: change the default printer settings. but when i change it (programmatically), it does not respond. my printer doesn't seem to respect me...

so when i print anything in my program, i have to adjust manually in the control panel, the paper size.

any suggestions???

Printer's PaperSize Problem
Hi people, i have a question. I want to set the printer's paper from VB6.

Code:
Printer.PaperSize=40 'fanfold german, for example
and i get an error that papersize is read only. is there any way to do it?

Set Custom Printer Papersize?
I did a search already to see how to set your printer papersize and found only constants for setting it. Is there a way to set a custom size? I am printing on a thermal printer and have 2.25"x1.5" labels being printed.

Thanks!

Changing Printer.papersize=vbPRPSLetter
Dear All,
I'm having problem to set paper size at code level instead of A4,
i want to set it to Letter....
For built-in paper size like A4, iam setting to Printer.papersize=vbPRPSLetter for Letter in the visual basic code.

but it is not setting to Printer.papersize =vbPRPSLetter

please helpme on this regard...

Thanks a lot !!!
Ourspt...

Printer.PaperSize Doesnt Work???
hi all
i have a problem with printer properties...
i m using Printer.PaperSize = 256 and then define the paper size programmeticly. It works well with printer. But for plotter it gives run time error 380 'Invalid property value'. what could be the reason.....???

How Set The Paper Size, Printer.Papersize(?)
I am coding a little program to print graph paper.. (everyone's done this I presume).. I've got it to print on the standard 8.5 X 11 paper which I have figured out is the default setting when printing in VB..
What I want to do is have an option for the user to use 14 inch paper.. I'm stuck at Printer.Papersize(?) Whats the syntax ? Thanks

Can't Change Default Printer.PaperSize (Please Help)
Hello everybody. I need to fill in and print out some Italian postal forms which are 33 cm long.

The default paper size set on Italian printers is A4, the length of which is only 29.7 cm, so I need to extend it by about 3 cm more or less.

I have set Printer.PaperSize = vbPRPSLegal, since the vbPRPSLegal constant should be equivalent to 35.6 cm but, in spite of this, the printing is truncated after 29.7cm.

Please consider that I compiled my form to an executable before testing the code but it did not work. Here is the incriminated code:


VB Code:
Private Sub Command1_Click()     Printer.ScaleMode = 7    Printer.Orientation = 2        Printer.PaperSize = vbPRPSLegal        Printer.FontName = "Verdana"    Printer.FontSize = 10        Printer.Print ""        Printer.Print "I would very much like this line to be printed out on a 21.6x35.6cm sheet of paper. Unfortunately, it looks like there's no way to change the default settings of my printer which do not want to exceed the 29.7cm height of an A4 page. I know for sure it does not depend on the model of my printer because I have installed someone else's VB6 program which manages to extend the length of the printable area. Why on earth doesn't it work?"        Printer.EndDoc End Sub


I would very much like to know what's wrong with the code above.

Any help will be greatly appreciated.

TIA

Finding Printer Settings - PaperSize
I am attempting to find the papersize of all of the printers on a computer (some Win9x other NT/2000),

For example I need to find a printer which has a papersize of "Fanfold 1" (14 7/8 x 11 inches) for a particular type of Cyrystal Report.
I can hardcode the name and tell it to search for that printer but it isn't the same printer name for every PC.

I have tried the VB 6 Printers collection and it always returns A4 even though the one of the printers has all of the defaults/settings etc... to "Fanfold 1" I have also tried it via API, EnumPrinters and the DEVMODE structure but all I get from the DEVMODE structures are zero (0) values for every printer (and I have 12 printers setup on my PC) eg:
"printinfo(c).pDevMode.dmPaperSize" always returns 0
"printinfo(c).pDevMode.dmDeviceName" always returns gibberish
for A4 size it should return 9 and
for Fanfold 1 size it should return 39

Is there something I am not doing correctly?

List Of All Papersize In My Printer *Solved*
Hi all

How can i Get All Papersize that my Printers Support ?




Edited by - FarzinSotoodi1349 on 12/19/2005 11:46:28 PM

Printer Papersize And Orientation Problems - ARGH!
Hi -
I'm using VB6 and the Printer object.
I'm trying to change the papersize and orientation after a print job has been started, but only the orientation seems to work.

I can do this easily within other apps - for example, with MS Word, I can have a 8.5x11 page and an 11x17 page, plus different orientations within the same doc, and when I print, everything works.

However, when I use the VB Printer object, it doesn't seem to work (also, I'm printing to Adobe PDF driver each time)

Code:
Printer.PaperSize = 3
Printer.Orientation = 2
Printer.Print "HHH"

Printer.NewPage
Printer.PaperSize = 1
Printer.Orientation = 1
Printer.Print "BBBB"

Printer.NewPage
Printer.PaperSize = 7
Printer.Orientation = 2
Printer.Print "SSSS"

Printer.EndDoc


I've also tried using several variants of DEVMODE, with the same results. Orientation works, but not papersize...

Can anyone supply me with tested code that can do this?

Thanks.

Seeting Printer Papersize At Runtime-Datareport
Sir,
    I want to set the printer papersize to a small dimension say 6cmX4cm for printing bill to a Bill Template. Is it possible in runtime trough code?

How Do I Set The Printer To User Defind. ?(No Papersize On The List)
I would like to set the Printer.Papersize to width = 7 an height = 8.5 inch ,but there is not papersize on the list . I try to
set to "User defind" paper size = 256 like this

sub TestPrint(0
           Printer.ScaleMode = 1
            Printer.PaperSize = 256 ' or Printer.PaperSize = vbPRPSUser
             Printer.Height = 8.5 * 1440
              Printer.Width = 7 * 1440
              Printer.Orientation = 1
              Printer.Print
              Printer.EndDoc
End sub

     But it dos't work properly. (No effect)
      Somebody help me please, thank you very much.

sksakorn@yahoo.com
 


 

How Can I Get Default Margins Of The Currently Selected Papersize Of The Printer Object ?
"How can I get default margins of the currently selected papersize of the printer object ? "

When we open page-setup in Notepad/Wordpad they always loads with default page of the default printer. And they always load with some pre-defined margins.
No, the margins aren't hard coded. Set the default page of the default printer to a very small one (say 1"x1") from ControlPanel>Printers, and Notepad/Wordpad will reflect the change in margins.
I want to know how they are doing this. Please help me.

Sorry I Asked The Wrong Question Yesterday (Printer-PaperSize-Margins)
sorry I asked the wrong question yesterday.

I asked "Is there anything like 'Default Margins' of a printer ?"
http://www.xtremevbtalk.com/showthread.php?t=234164

The question should be , "How can I get default margins of the currently selected papersize of the printer object ? "

When we open page-setup in Notepad/Wordpad they always loads with default page of the default printer. And they always load with some pre-defined margins.
No, the margins aren't hard coded. Set the default page of the default printer to a very small one (say 1"x1") from ControlPanel>Printers, and Notepad/Wordpad will reflect the change in margins.
I want to know how they are doing this. Please help me. And again I'm very sorry for asking the wrong question yesterday.

Papersize Again
Hey guys, ive a Epson LX300+, and im trying to print at a 8.8(h) x 4.7(w) cm paper, and its not working..


Code:
With Printer
.ScaleMode = vbCentimeters
.Height = 4.7
.Width = 8.8
frmimpalmoxarifado.PrintForm
End With
it keeps printing in a letter format
and for another printer , a EPSON EPL 5700 laser, i get the error: "cant print form image to this type of printform"
ive looked to some posts but noone had an answer

Thanks
Eli

Set The PaperSize In CR
Hi Members!

I have added the Crystal Report in VB program....But I am facing problem to set the papersize.

I have actuall paper size is 8.5 x 13 inch...which is custom size, how it will set. I used the following statements:

1) Report.setPaperSize 13x8.5
2) Report.paperSize=crPaperuser

How it will set the papersize 8.5 x 13 inch

Thanks

How To Set Papersize
Hi. i have a codes that will print a contents of a Text1, my problem now is how can i set my papersize to 3 x 5 of paper.

PaperSize
I try to change the paper size to legal (8.5x14) using this code:

Printer.PaperSize = 5
DataReport1.Show vbModal

But when the DataReport show, the Paper Size is still 8.5x11..
What code should I write to change the paper size to Legal?
I badly needed your help.

Using .PaperSize
I want to set the Paper Size for my Report in my VB Program. The Paper Size is called 'Delivery' and I created it my self. I am trying to do:

Set CReport = CApp.OpenReport(DirPath & "Deliveries.rpt")
CReport.PaperSize = Delivery

But it's returning an error. Can someone tell me the right way to do this?

Thanks.

Papersize
how could i set the predefined papersize in vb??
and the size is not regular

Papersize
how could i set the predefined papersize in vb??
and the size is not regular

Papersize
i want to print an invoice from the application (not from datareport)
with the paper size halfletter or width=8.5' height=5.5'

the code is:
printer.papersize=256
printer.height=5.5
printer.width=8.5

i also try
printer.papersize=vbPRPSUser
printer.height=5.5
printer.width=8.5

but the coding doesn't work. the paper size still use the default papersize
please give me the solution to set the paper size that i need

note:
i use epson lx 300+

Papersize Problem
I've been doing my nut all day with this, I'm probably missing something obvious but I can't solve it.

My computer is on winXP and my printer is a Canon BJC 4000

In my vb program the statements below all cause improper value error
printer.papersize = vbPRPSA5
printer.papersize = 11
printer.papersize = vbPRPSUser
printer.papersize = 256

In fact the only ones it will work for are A4, letter B5 and the other sizes that
show up as being available in the control panel printer properties.

In MS Word I can specify a custom size of 148mm X 210mm (ie A5)
but not in Visual Basic.

The same printer on a Windows98 machine offers a far wider selection of papersizes in the control panel including A5 and custom sizes.

Another peculiarity is the effect the following code has

printer.height = 210 * 56.7
printer.width = 148 * 56.7

has absolutely no effect on the papersize ie it still prints A4 size if thats what the printer is already set to, it doesn't cause an error either, in fact the only effect i have been able to find is that if you follow the above code with:
msgbox(printer.papersize) you get 256, ie custom but the printer still prints in A4.

Tell me how I'm being dumb please!!!!!!!

Print - Papersize
I want to print a report half the size of A4 paper. How to do it.
Pleeeeeeeeaase help. Its urgent.

Papersize Or Paperbin
I am trying to print to a QMS 2060 printer on 11X17 paper in the upper paper
tray. I have tried to bring up the Printer Dialog box and modify the paper
bin and paper size but although I can modify the settings my report keeps
printing on letter size. If I try the "printer.papersize = " command I
receive a run-time error '380', Invalid property value. I have tried using
"3" and "258" as the values.

Paperbin property has the same result.

Can anyone offer any advice? Thanks in advance!

Papersize Of Print
I show print setup dialog using CommonDialog. When it was closed, I need to retrieve new configuration value. But I do not know how to read the papersize property: CommonDialog has no such property. Who can tell me? Any help is appriciated.

Set Default Papersize
Please, tell me how to set papersize for printer
I used SetPrinter API but not successful

How To Change PaperSize And Orientation
I have one Data Environment with few Command (few Report). Some reports size are in 8.5 inch width (Letter size) and some are 14 inch width (not sure the name).
How can I change the Paper Size every I want to print the different size of report? my default paper size is A4. When I want to show the report which is in Letter size, a message says "Report width is larger than paper width".
I had tried this: "[Report].PaperSize = 1" (1 is Letter Size) before I show the report, I also tried "[Report].Orientation = 2" (2 is Landscape), both dont work.

Can anyone guide me....

Thank you

Printing With Custom Papersize
Hi, i've got a problem printing with a custom sized invoice paper. It is 5.5"x8.5"

The problem is that when it is finished printing the fields, the printer continues to feed until it hits 11" of the page instead of the end of the invoice which is 5.5".

the code i have to control this is:


Code:
Printer.ScaleMode = vbPoints
Printer.PaperSize = 256
Printer.Height = 156 '5.5" Papersize
Printer.Width = 241 '8.5" Papersize
I'm using a Raven RP-9105 dot matrix with a Panasonic KXP2180 driver.

When i compile the program, it causes an error and points towards Printer.Papersize

When i check it, the value of Printer.Papersize is 1, even though i set it to 256.

Any ideas??

Thanks

How To Change The Datareport Papersize??
Dear all,

I have been try many way to change the Datareport papersize but it can't been success, such as

Code:
Printer.papersize = VBPRPSlegal
datareport1.show
'Result still similar to the default size

or

set the width of the paper but it just allow you to adjust the width only not the height:


Code:
datareport1.reportwidth = 5 * 1440 'in vb 1440 = 1 Inch

Who can help me??

Printing With Custom Papersize
Hi, i've got a problem printing with a custom sized invoice paper. It is 5.5"x8.5"

The problem is that when it is finished printing the fields, the printer continues to feed until it hits 11" of the page instead of the end of the invoice which is 5.5".

the code i have to control this is:


Code:
Printer.ScaleMode = vbPoints
Printer.PaperSize = 256
Printer.Height = 156 '5.5" Papersize
Printer.Width = 241 '8.5" Papersize


I'm using a Raven RP-9105 dot matrix with a Panasonic KXP2180 driver.

When i compile the program, it causes an error and points towards Printer.Papersize

When i check it, the value of Printer.Papersize is 1, even though i set it to 256.

Any ideas??

Thanks

CommonDialog ShowPrinter PaperSize
How can i see what papersize the user choose from the CommonDialog control
If you press preferences in the CommonDialog ShowPrinter and then press advance, you can change the paper size but I don't know how to see the change

Anyone know how to do that??

Thanks

Changing Print PaperSize
I have coded a billing application in VB. But now the problem arises with printing.

The printed bill is to be of size 20cm width and 8 cm height.
That is one-third of an A4 size paper.But when i print some
lines using Printer.Print and then call Printer.Enddoc, the full
A4 size paper is ejected out from the printer.
I need to print 3 bills on one paper and tear off the printed part as each bill is printed.

When i eliminate the Printer.Enddoc, the paper is not coming out at all until i exit the application. I hav tried changing the Printer.Height property but none works. Could anyone know a way to solve this?

The requirements are:
1)Print some lines using Printer.Print method (this is working fine now)
2)Eject only that much part of paper so that i can tear off the printed bill. (this is the one that needs help)

Can't Create Custom Papersize In VB6
Hi there,

how can print in custom paper size in VB6, i want to print 4"x4 form on dot matrix printer, Epson LQ-300+, but of avail no matter what i do it always go the default papersize, and i could not change it default size that I want. am using WinXP.

thanks,
oscar

Change PaperSize For Preview DataReport
I want to show/preview my DataReport in Legal size (8.5x14). I try to change the paper size to Legal using this code:

Printer.PaperSize = 5 'vbPRPSLegal
DataReport1.Show

But the DataReport still show in the default paper size, Letter(8.5x11).
Printer.PaperSize does not change the paper size in DataReport.

Is that other way?
Please help.
Thanks.

Crystal Report Papersize Question
Just wondering, I have a report created in Crystal Report. And I want my viewer to open up on a 3.5 x 5 papersize. It is working if I use the numeric value of the papersize, let say (crpReport.PaperSize = 155). 155 was setup on my printer as "Small Sign". Now my question is, how can I use "Small Sign" instead of 155?

Changing Data Report Papersize
is there any other way to change the data report papersize? i want to change the papersize from custom size 8.5 by 11 to 8.5 by 13. please help me solve this problem..

tnx...

Changing Data Report Papersize
how can i change the papersize of the data report?i have to use folio or legal size instead of letter size which is 8.5x11.i need to use 8.5x13.

any idea?please kindly help me....

PaperSize Problem In Crystal Reports
I am using Crystal Reports 4.6 with VB6

I create a report of fanfold paper size on a PC in which the printer supports this paper size. When I use that crystal report file at other PC (the other PC's installed printer not supports fanfold paper size), the report view is in envelop size paper generally. This don't display complete data.

How can I get rid of this problem ?

Thanks

Getting Run-time Error 424 On Setting Papersize!
The following statement produces Run-time Error 424, although there is nothing wrong with the printer.

Printer.PaperSize = vbPRPSUser

LEGAL Papersize Using Data Report
Is there a way to set the data report in legal size, and what is it? NEED HELP URGENT!!!!!!!

thanks in advance

Copyright 2005-08 www.BigResource.com, All rights reserved