PrintDocument and PaperSize

P

Pashkuale

I tried several ways to programmatically set the size of a page while
printing with PrintDocument object without success.

In pratice, this code...

Dim printInvoice As New PrintDocument
AddHandler printInvoice.PrintPage, AddressOf Print
printRicevuta.DefaultPageSettings.PaperSize = New PaperSize("A5", 583, 827)
printRicevuta.Print()

....print always in the A4 format. I have also tried to set the PageSize in
the PrintPage and QueryPageSettings too but is the same.
Which is the right way to set the damned paper size of a print job???

I'm using the 1.1 version of the framework.

Bye,
Pas.
 
N

Nassos

Hello Pashkuale,
try use the printRicevuta.PrinterSettings.DefaultPageSettings.PaperSize
this way you change the accual size of the printer paper!!
Hope tha works
Nassos
 
P

Pashkuale

try use the printRicevuta.PrinterSettings.DefaultPageSettings.PaperSize
this way you change the accual size of the printer paper!!
Hope tha works

Unfortunatly, it doesn't work! When I try to print with a virtual printer
like the Microsoft Office Document Image Writer the page's size is always
A4.
I don't think it's a problem of this virtual printer because printing e.g.
from notepad after setting the page size in A5 the produced output has that
size.

Thanks,
Pas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top