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
close icon

PdfViewer printing blank pages

The following method prints three blank pages for a three-page PDF file which exists on disk. It does not throw an error.

public static void PrintPdf(string pdfFileName, string printerName)
{
    PdfViewerControl viewer = new PdfViewerControl();
    viewer.Load(pdfFileName);
    PrintDocument document = viewer.PrintDocument;
    document.PrinterSettings.PrinterName = printerName.TrimEnd();
    document.Print();
}

I'd appreciate any help in determining why.

10 Replies

AK Ayswarya Krishna Kumar Syncfusion Team March 28, 2017 11:10 AM UTC

Hi Larry,

Thank you for contacting Syncfusion support.

We are unable to reproduce the mentioned issue “Blank pages are obtained while printing PDF document using PDF Viewer” at our end. We have tried to
reproduce the issue by preparing a sample using your code snippet and attached the same for your reference in the Essential studio version. Please find the sample from the below link.

Sample Link:
http://www.syncfusion.com/downloads/support/forum/129671/ze/PDFViewer-1067093643.zip 

Kindly modify the attached sample to reproduce the issue at our end and also provide the PDF document you have used to reproduce the issue. It will be helpful for us to analyze more and assist you better.

Regards,
Ayswarya
 



PG Pon Geetha A J Syncfusion Team March 29, 2017 04:17 AM UTC

From: Marshall, Larry [mailto:lcm@marshap.com]
Sent: Tuesday, March 28, 2017 1:57 PM
To: Syncfusion Support <support@syncfusion.com>
Subject: Re: Syncfusion support community forum 129671, PdfViewer printing blank pages, has been updated.
 

Or better yet, is it possible to extract the libraries I need rather than install the entire suite? 

On Tue, Mar 28, 2017 at 7:20 AM, Marshall, Larry <lcm@marshap.com> wrote: 
I noticed in your sample you're using 15.1.0.33. I used 37. Also, I have a Community License for the Enterprise Edition. 

I installed the Enterpise exe on my D disk (System disk on C is a small SSD). I am getting compilation errors. Can you help me resolve them? 

Severity Code Description Project File Line Suppression State 
Error NuGet Package restore failed for project PDFViewer: Unable to find version '15.1.0.33' of package 'Syncfusion.PdfViewer.Windows46'. 
  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Package 'Syncfusion.PdfViewer.Windows46.15.1.0.33' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'. 
  https://api.nuget.org/v3/index.json: Package 'Syncfusion.PdfViewer.Windows46.15.1.0.33' is not found on source 'https://api.nuget.org/v3/index.json'. 
. 0  

Severity Code Description Project File Line Suppression State 
Error NuGet Package restore failed for project PDFViewer: Unable to find version '15.1.0.33' of package 'Syncfusion.Pdf.Base46'. 
  C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Package 'Syncfusion.Pdf.Base46.15.1.0.33' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'. 
  https://api.nuget.org/v3/index.json: Package 'Syncfusion.Pdf.Base46.15.1.0.33' is not found on source 'https://api.nuget.org/v3/index.json'. 
. 0  



PG Pon Geetha A J Syncfusion Team March 29, 2017 05:39 AM UTC

From: Marshall, Larry [mailto:lcm@marshap.com]
Sent: Wednesday, March 29, 2017 12:25 AM
To: Syncfusion Support <support@syncfusion.com>
Subject: Re: Syncfusion support community forum 129671, PdfViewer printing blank pages, has been updated.
 

Did you respond to my questions? 



AK Ayswarya Krishna Kumar Syncfusion Team March 29, 2017 11:16 AM UTC

Hi Larry,
 
Sorry for the
Inconvenience caused.

On analyzing further on the mentioned stack trace details, we found that these errors may occur due to assembly conflicts with the Nuget packages installed. We have modified the project.json file of the sample to overcome this issue and attached the sample for your reference
. Please find the sample from the below link.

Sample Link:
http://www.syncfusion.com/downloads/support/forum/129671/ze/PDFViewer_Demo738393047.zip

Kindly modify the attached sample to reproduce the issue at our end and also provide the PDF document you have used to reproduce the issue. It will be helpful for us to analyze more and assist you better.

Regards,
Ayswarya
 



LM Larry Marshall March 29, 2017 02:46 PM UTC

Thanks, I can compile and run successfully now with your code.

However, when I substitute my PDF for your Barcode.pdf, I see (don't see) the same results as I originally reported: blank output.

Perhaps you could try it?

Attachment: test_dc9418c4.7z


LM Larry Marshall March 30, 2017 04:24 PM UTC

Any help with my issue?


AK Ayswarya Krishna Kumar Syncfusion Team March 31, 2017 11:58 AM UTC

Hi Larry,

We are able to reproduce the issue, “Blank pages are obtained while printing the PDF document using PDF Viewer” and we suspect this to be a defect. We will update you with further details on April 3rd,2017.

Regards,
Ayswarya



AK Ayswarya Krishna Kumar Syncfusion Team April 3, 2017 12:32 PM UTC

Hi Larry,

Thank you for your patience.

A support incident to track the status of the reported issue has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Regards,
Ayswarya
 



DC Davide Ceccucci July 3, 2018 07:20 AM UTC

Hi.
We have encountered a problem similar to the one described above.
We limited the problem only to PDFs created by Lexmark scanners.
Optimizing the pdf file created by lexmark scanner with adobe acrobat professional files work. We did not find a similar feature in Essential Pdf.

Are you aware of this problem?
Do you have any solutions?


PE Priyanga Elangovan Syncfusion Team July 6, 2018 12:45 PM UTC

Hi Davide,

Thank you for contacting Syncfusion support.

If you are facing the issue “Blank pages are obtained while printing the PDF document using PDF Viewer”, we have integrated the Pdfium rendering engine in to our PDF viewer control and this issue was not reproduced using the same. The support for Pdfium rendering engine is available from the Essential studio version 16.1.0.24. Kindly upgrade to our latest essential studio version and it
is available for download under the following link.

https://www.syncfusion.com/forums/137209/essential-studio-2018-volume-1-service-pack-release-v16-1-0-37-available-for-download  


Please find the KB and a simple sample illustrating how to use Pdfium with PdfViewer for your reference in the following link.
https://www.syncfusion.com/kb/8569/how-to-use-pdfium-rendering-engine-in-syncfusion-pdf-viewer-for-wf


Or else, can you please provide the clear description about your requirements such as name of the features, screen shots or video illustration? So that, we can analyze and provide you the proper solution at the earliest.

Regards,
Priyanga.E


Loader.
Live Chat Icon For mobile
Up arrow icon