I have a winform application where you can select a page via a combobox item. Everytime a page is selected , the corresponding panel is being displayed. Every page can have different formats like A4, Landscape or A3 .
So when I click the "Print" button, I create an image for of each panel content and store it in a list, so that I can access it in the PrintPage event handler.
Now what I want is, that in the printpreview dialog, those pages should be shown in the correct format like a4, a3 or landscape.
Is this possible ? If so, how can I change the format for each displayed page ?
Thanks to all of you for your comments, which helped me a lot !!
I skipped the preview dialog and created a PrintDocument for each page, where as each PrintDocument was then sent to the printer by the PrintDocument.Print() call.
I have set the PaperSize and Landscape manually and it worked for me !
Many thanks !!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.