Page 1 of 1

Invalid PDF files created

PostPosted: Fri Jul 24, 2015 1:15 am
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;

Re: Invalid PDF files created

PostPosted: Fri Jul 24, 2015 3:46 pm
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