1

Can any one tell me how to override page orientation selection in pdf print dialog using iTextSharp.

I am using these lines to override scaling and "Choose paper source by PDF page size"

writer.AddViewerPreference(PdfName.PRINTSCALING,PdfName.NONE);
writer.AddViewerPreference(PdfName.PICKTRAYBYPDFSIZE, PdfBoolean.PDFFALSE);
Mohamad Amir
  • 253
  • 1
  • 2
  • 9

1 Answers1

0

Please check table 150, entitled "Entries in a viewer preferences dictionary", in ISO-32000-1 (you can download a copy from the Adobe web site). It contains all the viewer preferences you can define in a PDF document, including PrintScaling and PickTrayByPDFSize, but you won't find any setting to override the page orientation selection.

In other words: you're asking something that isn't defined in the PDF specification, and as a result, it isn't implemented in any PDF library (as far as I know).

Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165