Hi,
i try to print something directly from a C++ applikation (VS6.0, Microsoft XP).
I tried to use the Adobe Printer, but that doesn`t work (Acrobat Reader can`t open the file).
I wrote the following code:
////////////////////////////////////////////////////////////////
DOCINFO dci1; // write file
T_LONG dret;
CDC dcPrint;
// DocInfo for Spooler/
//Real printer------------------------------------------------
// dci1.lpszDocName = "C:\\Hallo";
// dci1.lpszOutput = NULL; //"OutputFile1";
//Adobe--------------------------------------------------------- dci1.lpszDocName = "";
dci1.lpszOutput = "D:\\Test.pdf"; //"OutputFile1";
dci1.lpszDatatype = NULL;
////////////////////////////////////////////////////////////////
Using the real printer works.
Is it possible to create a PDF-File in an other way? Can I use special DLLs? Can you tell me where I got the needet information, please?
Thank you,
Bernhard
1. Force the system to execute Acrobat/Reader from the command line with the proper command line options for printing. On windows use "ShellExecute()". Of course, for this you have to detect and locate either Reader or Acrobat first.
2. Use the Acrobat IAC interface to do the printing. This is be far the best option. You'll find the documentation here.
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script