Create PDF without PDF Printer

Navsyst2Navsyst2 Member Posts: 29
Hallo everybody,

could anyone tell me, if there anyway to create PDF Document without to install PDF-Printer?




  • ta5ta5 Member Posts: 1,164
    You could use a DLL from
    The DLL contains all commands to create a pdf. A trial version is available there.
    Afaik there also exists freeware/opensource DLL's, but the one I know is for java only.

    Hope this helps
  • Navsyst2Navsyst2 Member Posts: 29
    Hi ha ha ha ha ha (ha5)

    thanks for your reply. I really appreciate it.

    Another question: Do you use activepdf in Navision too?

    Last guestion for everyone: Do anyone know how SAP works according to creating pdf-documents? They said that they didn't need to install any PDF-Printer. Is that true?

  • ta5ta5 Member Posts: 1,164
    I prefer ha*5 :lol:

    I used activepdf in a Web-Project with Active Server Pages, where it also was used as automation server. I do not use it in Navision.

    SAP: Sorry no info about this.

  • gycsiakgycsiak Member Posts: 19
    Hi there!

    Anyone knows a way on Dynamics NAV 2009 SP1 (Build: 29626) in Classic Client, how to use Microsoft Print to PDF virtual printer in C/AL code to give the desired name and location for the result PDF, so that no standard file name request form jumps up, only the printing (I mean PDF generating) happens without any user interference?

    I tried to use this example, but it seems, that these .NET Framework Namespaces/DLLs are invisible in the Dev Environment, and on the same server, Dynamics 365 Business Central 14 Dev Env sees them and can declare them, as dotnet type Variables, but for 2009 SP1, they cannot be selected:

    Code example from web forums:

    FileName@1000000000 : Text[250];
    FileName := 'c:\Temp\Demo.pdf';
    PrintDocument(FileName, '', 10000);


    PROCEDURE PrintDocument@1000000001(FileName@1000000000 : Text[250];PrinterName@1000000003 : Text[250];TimeoutInMs@1000000004 : Integer);
    Process@1000000002 : Automation "'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.Process" RUNONCLIENT;
    StartInfo@1000000001 : Automation "'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.ProcessStartInfo" RUNONCLIENT;
    PrinterSettings@1000000005 : Automation "'System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.System.Drawing.Printing.PrinterSettings" RUNONCLIENT;
    IF PrinterName = '' THEN BEGIN
    // Falls kein Drucker angegeben, den Standarddrucker verwenden
    PrinterSettings := PrinterSettings.PrinterSettings;
    PrinterName := PrinterSettings.PrinterName;

    StartInfo := StartInfo.ProcessStartInfo;
    StartInfo.Verb := 'PrintTo';
    StartInfo.FileName := FileName;
    StartInfo.Arguments := '"' + PrinterName + '"';

    Process := Process.Process;
    Process.StartInfo := StartInfo;

    IF NOT Process.WaitForExit(TimeoutInMs) THEN BEGIN


    Thanks in advance,

    Best begards,
  • vaprogvaprog Member Posts: 1,091
    Your code, if it runs, prints the file given by the FileName parameter to the printer given by the PrinterName parameter, using the default app that is registered for printing files with the filename extension given by the FileName parameter.

    If you want to specify the filename that the printer should generate, you would need to create a printer port, or search for, install and then control a printer port that lets you specify the output filename the port writes to.

    I don't know if such software is available. I know it used to be possible to specify a file name as printer port. (Entries like LPT1: or COM1: are essentially just that: a device accessible via the API for writing files.)
  • vaprogvaprog Member Posts: 1,091
    REPORT.SAVEASPDF is not a thing in NAV 2009 SP1.
  • gycsiakgycsiak Member Posts: 19
    edited 2023-03-09
    nexpayne wrote: »


    The reports are in a classical format and object, and no resource is allocated to convert all of them to RDLC-Type reports and use RTC Client instead, so this option is not available in our situation.

    Meanwhile, I have found a possible solution to our demand, which can be set up for Auto-Save Folder and Filename Template also for future PDF-Printing:
Sign In or Register to comment.