Print a PDF document using Acrobat Reader

Hi I have a problem of how to print a PDF document directly to a printer. I have found out that I could use Acrobat Reader by calling the program with commands “C:\Programmer\Adobe\Acrobat 6.0\Reader\AcroRd32.exe” /p /h c:\filer\formular.pdf How do I do that in Navision. Kind regards Kenneth Jarlshøi Bolø Bredana Systemudvikling A/S Denmark

SHELL('"C:\Programmer\Adobe\Acrobat 6.0\Reader\AcroRd32.exe" /p /h c:\filer\formular.pdf');

Thank stryk When I try using SHELL it reject it with the following error [V] : The filename “C:\Programmer\Adobe\Acrobat 6.0\Reader\AcroRd32.exe” /p /h c:\filer\formular.pdf contains a character that may not be used. Please check the file name. When I copy the text to a BAT file it works fine, but I would like to call it as you describe.

I just tried this one: SHELL('"C:\Programme\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" /p /h c:\test.pdf'); It works fine … what NAVISION version do you use? I tested it on 3.70 W1 P.S.: Please regard carefully the quotation marks ’ and "

ver. 4.0 But I have found out that I should use the command SHELL this way : PDF_FileName := ‘c:\filer\formular.pdf’; SHELL(’“C:\Programmer\Adobe\Acrobat 6.0\Reader\AcroRd32.exe”’,’ /p /h ',PDF_FileName); This works fine. Thanks for your help.

4.0 introduces a change to the way parameters are passed onto the SHELL command. Hence your divergence.

Kenneth, We aren’t using 4.0 yet, but I’ve found the following to be a good alternative the the SHELL command. It eliminates the need to know where Acrobat is stored. This avoids the maintenance hastle everytime acrobat is updated. filename:=‘c:\filer\myPDFfile.pdf’; IF EXISTS(filename) THEN HYPERLINK(filename) ELSE MESSAGE(‘Can’‘t find file %1’,filename); The only downside is that depending on the workstation setup, you may get Acrobat alone, or inside a Browser as a helper application.

quote:

HYPERLINK(filename)

But this will not print out the document [;)]