Printing documents with orientation

Last post 02-07-2012, 4:11 AM by Amjad Sahi. 3 replies.
Sort Posts: Previous Next
  •  02-07-2012, 1:14 AM 359638

    Printing documents with orientation .NET

    Dear Aspose,

    I would like to print the file with orientation (Landscape/portrait).
    How can I print?? Kindly advise.

    Regards
    Amerischool
     
  •  02-07-2012, 1:41 AM 359645 in reply to 359638

    Re: Printing documents with orientation

    Hi Kaline,

    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,


    Nausherwan Aslam
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  02-07-2012, 3:37 AM 359682 in reply to 359638

    Re: Printing documents with orientation

    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:

    I hope, this will help.

    Best Regards,

    Awais Hafeez
    Support Developer
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  02-07-2012, 4:11 AM 359710 in reply to 359682

    Re: Printing documents with orientation

    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:

    Thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
View as RSS news feed in XML