Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Jun 21, 2024 7:38 pm

I have a pdf file that prints correctly when I use the doc.Print() function. The PDF file is attached.

Dim doc As New Spire.Pdf.PdfDocument
doc.LoadFromFile("c:\test\WLN-5000-0110-08-23-26L Rev B.pdf")
doc.PrintSettings.PrinterName = "HPPRINTER01"
doc.Print()

If I print the file from a generated PCL file, the PDF is larger than expected and cuts off part of the printout.
Dim doc As New Spire.Pdf.PdfDocument
doc.LoadFromFile("c:\test\WLN-5000-0110-08-23-26L Rev B.pdf")
doc.PrintSettings.SelectSinglePageLayout(Spire.Pdf.Print.PdfSinglePageScalingMode.ShrinkOversized, True, 90)
doc.SaveToFile($"c:\test\Drawing.pcl", Spire.Pdf.FileFormat.PCL)

I have tried different methods to print the file to the printer. Below is an example
lpr -S 10.1.10.101 -P PCL c:\test\Drawing.pcl

I am using the latest version.

What am I missing that is causing the PDF to not print correctly on the doc.SaveToFile?

[email protected]
 
Posts: 1
Joined: Thu Dec 28, 2017 10:08 pm

Mon Jun 24, 2024 4:00 am

Hello,

Thanks for your inquiry.
Yes, I did reproduce the issue you mentioned, and I have logged this issue in our tracking system with the ticket number SPIREPDF-6860. Our development team will further investigate and fix it, and I will notify you in time after the fix. Sorry for the inconvenience caused to you.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 762
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.PDF