Printing horizontal pages...

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hello, how can I print horizontal pages in c#? I have
used the landscape property, setting it to true, but it
still prints it vertically, maybe it's my printer?
another way I thought is to rotate the graphic object
(g), but I haven't tried that yet.
another thing, the amount of rotation is 270, the sdk
says it supports 90 and 270, but that info is read only
so I can't put 90 to see what happends

thanks in advance
 
James,
Where are you setting Landscape? It needs to be set in each call to
OnQueryPageSettings which I just override to C# as below for an all
landscape document.
protected override OnQueryPageSettings(QueryPageSettingsEventArgs e)
{
base.OnQueryPageSettings();
e.PageSettings.Landscape = true;
}
I've found it much cleaner to create a complete PrintDocument override
and handle all the events for printing. This allows you to allocate items
and reset the print datastream in OnBeginPrint, deallocate everything in
OnEndPrint, and handle the page settings as needed.

Ron Allen
 

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

Back
Top