Hello everybody,
I'm new in C/SIDE developpement, and I'm looking for the things that Navision is able to do.
I'm trying to print a PDF by using OLE. So I've created an Automation DataType wich subtype is 'Adobe Acrobat 7.0 Browser Control Type Library 1.0'.AcroPDF
So to make simple I've made this code:
chemin := 'C:\file_to_print.pdf';
CREATE(adobe);
MESSAGE('Vous allez imprimer: "%1"',chemin);
adobe.LoadFile(chemin);
adobe.Print;
But when I launch it, I've a windows error: "Microsoft Business Solutions-Navision has encountered a problem... blablablablabla ... ReStart Navision...





[-o< Please help me [-o<
Comments
Why impossible??? It's possible to open Word, Excel, why not Acrobat Reader? :-k
I found what's the problem...
The free version of acrobat, acrobat reader instal automation server, but they don't work!!! If I want it to work, I have to buy a full version =P~
http://support.adobe.com/devsup/devsup.nsf/docs/50709.htm
But it shoulds works!
Refuse to work by making other program crashed?? [-(
Because if I try to use Acrobat Reader 7.0 Automation with Navision W4.00 it crashes always. This is the code I use:
Name DataType Subtype Length
auto Automation 'Adobe Acrobat 7.0 Browser Control Type Library 1.0'.AcroPDF
IF ISCLEAR(auto) THEN
CREATE(auto);
auto.LoadFile('c:\mod.pdf');
auto.Print;
Can you help me? [-o<
The matter is'nt the code, but the fact that you need to have a writer edition of Adobe, because in the free version the automations are not enabled... #-o
that's all...
But you said:
Can you explain me, please? #-o
But if you want to use Adobe Automation, you will need to buy it, even if you just want to print a pdf on a printer. :?
Thank you Adobe ](*,)
(excuse my english, but my italian is twice poor)
Is there any other solution to this problem? :x
C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe /p /h test.pdf
But pay attention to the fact that Navision isn't a good shell manager, so when you do it, the encapsulation(don't know if it means something in english... =P~ ) is'nt well down, and adobe won't stop himself.
An other solution is to make a short program with a real language as C++, Java or C#, and to launch adobe with it, and kill it when the print is done.
I hope it will help you. O:)
You can check CLPrint from http://www.commandlinepdf.com CLPrint have many options for automation pdf print and pdf converting to images.