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.

Wed Feb 24, 2021 4:50 am

Hi.. Is it possible that I save the file as a pdf when printing? Currently my code is like below:

Code: Select all
...
pdffile.PrintSettings.PrintToFile(path+ Path.DirectorySeparatorChar+"saveacopy.pdf");
pdffile.PrintSettings.PrintController = new System.Drawing.Printing.StandardPrintController();
pdffile.Print();


Currently saveacopy.pdf always empty.

xiao0207
 
Posts: 45
Joined: Thu Dec 13, 2018 9:50 am

Wed Feb 24, 2021 10:12 am

Hello,

Thanks for your inquiry!

Kindly note that the PrintToFile method is only valid for virtual printers, and if you want to save the print result to PDF, you must use a printer that print results in PDF format.

Please confirm that the printer you are using meets the criteria, and if so, the issue still persists, please provide us with your printer's name. Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Mar 02, 2021 3:48 am

Hello,

Hope you are doing well!

How is the issue now? If it still exists, could you please provide us with your printer's name for further investigation?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF

cron