Print PDF file

Ashu_bhattAshu_bhatt Member Posts: 28
Hi All,

I need a solution to print pdf file which is already imported as a blob in navision. There can be mulilple pdf files which can print at a time (default printer).

I have done my investigation and came across some wonderful solution like

Root := Filename
SHELL('"C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"',' /p /h ',Root);

but the problem with this solution is that if another client has acrobat 8 installed it won't work. I am using window Vista


Thanks for you help
Ashok

Comments

  • ara3nara3n Member Posts: 9,256
    Is acrobat 8 installed in another folder?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Ashu_bhattAshu_bhatt Member Posts: 28
    no another NAV client has different version of Adobe which is 8
  • moh_baradamoh_barada Member Posts: 46
    you can put this instruction in a batch file where you can change it on each client pc.
    from navision you will only run the batch file.
    is this feasable for you ??
    Best Regards
    Mohamad Barada
    Independent ERP & CRM Consultant
    +961 70 912700
  • Ashu_bhattAshu_bhatt Member Posts: 28
    Yes, if you like to share code O:)

    moh_barada wrote:
    you can put this instruction in a batch file where you can change it on each client pc.
    from navision you will only run the batch file.
    is this feasable for you ??
  • TomasTomas Member Posts: 420
    Ashu_bhatt wrote:
    Hi All,

    I need a solution to print pdf file which is already imported as a blob in navision. There can be mulilple pdf files which can print at a time (default printer).

    I have done my investigation and came across some wonderful solution like

    Root := Filename
    SHELL('"C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"',' /p /h ',Root);

    but the problem with this solution is that if another client has acrobat 8 installed it won't work. I am using window Vista


    Thanks for you help
    Ashok


    Where do you put this code? OnPostReport? How can I print reports from navision using this code? I am always getting error message
    There was an error opening this document. This file cannot be found.
    

    Or should we export report into some file before printing it to pdf? But then your code has only ouput file name, not input.
Sign In or Register to comment.