Dear Aspose,
I would like to print the file with orientation (Landscape/portrait).
How can I print?? Kindly advise.
Regards
Amerischool
Hi Kaline,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I think you may try PageSettings to get your desired results. Please see the following sample code and check if it fits your needs.
Aspose.Pdf.Facades.PdfViewer pdfViewerKit = new Aspose.Pdf.Facades.PdfViewer();
pdfViewerKit.OpenPdfFile("D:\\Pages+from+Life_After_Outlook_gmail.pdf");
System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings();
printerSettings.PrinterName = "Adobe PDF";
System.Drawing.Printing.PageSettings pgs = new System.Drawing.Printing.PageSettings();
//set PageSize (if required)
pgs.Landscape = true;
//set PageMargins (if required)
pgs.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
pdfViewerKit.AutoResize = true;
pdfViewerKit.PrintPageDialog = false;
pdfViewerKit.PrintDocumentWithSettings(pgs,printerSettings);
pdfViewerKit.ClosePdfFile();
Sorry for the inconvenience,
Hi Kaline,
Hi Kaline,