Print PDF on non-native PDF printer through stream

Hello,

I must admit my problem is not directly linked to PDFCreator, but I think you could give me some help anyway.

Here is the thing : I have develop a software in C# that create a PDF document, using the PDFSharp library.

I want to print this PDF using directly the Windows spooler, without going through Adobe Reader or even PDFCreator, as I don't want to create the PDF file physically on the disk (I'm using a stream or a byte array).

I have managed so far to send the raw data to the spooler, but my problem is : if the printer cannot natively print PDF, the printing process fails.

Is there any way PDFCreator could help me to turn my PDF into raw data printing format, instead of just saving the file to the disk, or maybe magically transform any printer into a PDF native printer?

The best solution I have found so far is to create an Acrord32.exe process, with "/t" and the path to the a physical PDF file as arguments, but it's not satisfying because it both starts Adobe Reader and needs a physical file.

Thanks for your help or suggestions.

Hello,

PDFSharp is a good point for this as it is based on GDI+ and takes your commands and uses them to make the PDF, show screen preview and also print it.

Here is an example how to do it:

http://stackoverflow.com/questions/883456/printing-pdfs-with-pdfsharp

kind regards,

Philip

Good news for me, the client's printer is a HP LaserJet P3005, which handles natively PDF 1.4.

So although I didn't have the opportunity to test it yet, it should work perfectly with a raw byte array.