Invalid PDF files created

About the programming interface for the virtual PDF printer driver.

Moderator: jr

Mr. TA
Posts: 1
Joined: Fri Jul 24, 2015 1:12 am

Invalid PDF files created

Post by Mr. TA »

Hi all,

I'm trying to print to BullZip PDF printer using the System.Drawing.Printing.PrintDocument class and the file does get created, but it's not readable by neither Adobe Reader nor Firefox. The same code works fine with the XPS printer. Anything obvious that I am missing?

pd.PrinterSettings.PrinterName = printerName;
pd.PrinterSettings.PrintFileName = printFileName;
pd.PrinterSettings.PrintToFile = true;
jr
Site Admin
Posts: 500
Joined: Sun Mar 26, 2006 12:28 pm

Re: Invalid PDF files created

Post by jr »

Hi,

You should not print to a file as shown in your example.

Please see this ASP.NET example.

http://www.biopdf.com/guide/examples/pr ... aspnet.php

I hope this helps you :-)

Regards,
Jacob
Post Reply