Hello
When I print a PDF it always prints in Landscape and the content is always centered to the page. I want the PDF to be printed as it is in portrait mode. The content position should be same as in the PDF.
Please let me know what is require to be done
InputPdf inPdf = new InputPdf(strFileName);
printJob = new PrintJob(strPrinterName, inPdf);
printJob.PrintOptions.Copies = 1;
printJob.PrintOptions.Scaling = PageScaling.ActualSize;
printJob.PrintOptions.PrintAnnotations = false;
printJob.Print();
With Regards
Partha
PDF Prints always in landscape
Re: PDF Prints always in landscape
Support · Sep 12, 2018Hello,
You can set the orientation for the pages in the PrintJob using OrientationType property. If you would like to print the pages in portrait mode, then set the OrientationType as Portrait. Here is the code sample:
string strFileName = @"Input PDF file path";
string strPrinterName = "Printer name";
InputPdf inPdf = new InputPdf(strFileName);
PrintJob printJob = new PrintJob(strPrinterName, inPdf);
printJob.PrintOptions.Orientation.Type = OrientationType.Portrait;
printJob.PrintOptions.Copies = 1;
printJob.PrintOptions.Scaling = PageScaling.ActualSize;
printJob.PrintOptions.PrintAnnotations = false;
printJob.Print();
Thanks,
ceTe Software Support Team.