I have a PrintDocument that has several pages. One page in that document must be in a Landscape orientations instead of Portrail.
As the PrintPage event is triggered for each page on the document… at the very begining of that event handler I set the PrintPageEventArgs.PageSettings.Landscape to true.
That doesn’t works on THAT page… but I can see that Landscape is set to true and taked into account in the NEXT page.
I assume that somehow… after the event is triggered for a certain page you are not able to change the page orientation. That is more of less logic if you think it… but HOW COULD I SET THAT FLAG before EVENT fires in a multiple page PrintDocument?
Note: I don’t know in advance if the ‘next’ page will going to actually need a Landscape orientation.
I’m no expert at printing in .NET; however using Reflector; it looks like you might want to handle the QueryPageSettings event on PrintDocument. It looks like PrintController’s private PrintLoop() method, will invoke events in this order for each page:
Hope this helps.