Invalid PDF files created

About the programming interface for the virtual PDF printer driver.

Moderator: jr

Invalid PDF files created

Postby Mr. TA » Fri Jul 24, 2015 1:15 am

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;
Mr. TA
 
Posts: 0
Joined: Fri Jul 24, 2015 1:12 am

Re: Invalid PDF files created

Postby jr » Fri Jul 24, 2015 3:46 pm

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
jr
Site Admin
 
Posts: 491
Joined: Sun Mar 26, 2006 12:28 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron