We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Printing documents with orientation

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,


Thanks for your inquiry. I’m a representative from the Aspose.Words team. You can simply change the orientation of the Word document to landscape. For more information. please visit the following link:
http://docs.aspose.com/display/wordsnet/PageSetup+Members

I hope, this will help.

Best Regards,

Hi Kaline,


I’m a representative from the Aspose.Cells team. You can simply change the orientation of the Excel document to landscape or portrait etc. For more information. please visit the following link:
http://docs.aspose.com/display/cellsnet/Setting+Page+Options

Thank you.