We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

PdfViewerPrintOrientation is not working

Dear Sir/Madam,

I have followed the below tutorial to slient print a pdf document. 

But the printout is always in portrait, no matter how I change the below settings:
pdfviewer1.PrinterSettings.PageOrientation = PdfViewerPrintOrientation.Landscape;
dialog.Document.DefaultPageSettings.Landscape = true;
viewer.PrintDocument.DefaultPageSettings.Landscape = true;

And if I manually open the pdf and click the print button, the print out is able to print in landscape. Do you have any idea on this issue?
Thank you for your help in advance.

Some background information for your reference:
Size of the print out is 4 x 1.33 inch.
Pdf is created using syncfusion with a custom size 4 x 1.33 inch
Syncfusion Version is used.

5 Replies

US Uthandaraja Selva Sundara Kani Syncfusion Team March 8, 2019 01:53 PM UTC

Hi San,  
Thanks for contacting Syncfusion support. 
We tested printing the same PDF document using Syncfusion PDF viewer and Adobe Acrobat and found that, both the printed outputs are same. So, it is the behaviour of Adobe.  
Using the below code snippet will print the PDF document in the similar fashion as it is printed in Landscape mode using Adobe.  
pdfviewer1.PrinterSettings.PageOrientation = PdfViewerPrintOrientation.Landscape; 
 We attached the printed documents in the below link, 
We attached the sample for the same in below link,  
We will analyse further on silent printing the PDF document in the landscape mode as it is printed when using the print button and provide you more details on 12thMarch 2019. 
Uthandaraja S 

SF San Fung March 12, 2019 02:38 AM UTC

Dear Uthandaraja S,

Thank you for your prompt response, I have attached the sample pdf file for print out in size 4 X 1.33 inch for your investigation.

Attachment: Label_20190312102329_fa366e4.zip

SS Sathish Sivakumar Syncfusion Team March 13, 2019 12:45 PM UTC

Hi San, 
By default the PDF Viewer prints the PDF document as similar to actual size option available in the print settings of Adobe Reader. Please find the screen shot taken from Adobe Reader below for your reference.  
So Syncfusion’s PdfViewer also prints the provided PDF document properly as similar to the adobe reader in the Landscape orientation and Actual Size. 
Kindly share us the printed output document (PDF, XPS) of which you are stating an issue, so that we will analyze the issue and assist you with the better solution. 

SF San Fung March 14, 2019 01:29 AM UTC

Dear Sathish,

Please find the sample print of the printer attached for your reference with the below settings applied:
viewer.PrinterSettings.PageSize = Syncfusion.Windows.PdfViewer.PdfViewerPrintSize.ActualSize;
viewer.PrinterSettings.PageOrientation = Syncfusion.Windows.PdfViewer.PdfViewerPrintOrientation.Landscape;

The print out seems to be always in the center of paper with portrait settings when printing silently.
I have tried portrait, but the it did not changed the result.  

I have also attached the adobe settings for your reference.

Attachment: SamplePrintOut_e0a8c42a.zip

SS Sathish Sivakumar Syncfusion Team March 14, 2019 10:11 AM UTC

Hi San, 
We have created a support incident under your account, please follow the below link for more details about the implementation of the same. 
Kindly follow-up with the incident to know more details about the issue reported in Printing the PDF document using PdfViewer. 

Live Chat Icon For mobile
Up arrow icon