Click here to Skip to main content
15,887,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying automatically set paper size of the printer from my application. I have tried to set PrintDialog.PrintTicket.PageMediaSize to desired page size. Though the size is shown be set, the actual print comes on the default printer page size.
So how to set the page size programmatically?

What I have tried:

I have invoked the PrintDialog upon print and manually selected the page size and sent the print to the printer. Then it is working properly. But I can't serialize the PrintDialog to save the settings and use them later. Also setting the page size programmatically in PrintDialog does not have any effect on the page size.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900