D3 and mvBase

 View Only
  • 1.  Printing to PDF

    Posted 01-20-2021 15:53
    We have been requested by our Accounting folks to move quarterly report printing to pdf output to eliminate the need to print hardcopy reports.  Does anyone have experience in doing this and how were you able to make it happen?   We run D3 V10.2 on a Windows 2012 server.

    ------------------------------
    Cory Belgrade
    Sr Manager
    One America
    ------------------------------


  • 2.  RE: Printing to PDF

    Posted 01-20-2021 20:40
    Hi Cory,

    I've done this in D3 V9.2.2 when the COVID-19 pandemic hit.

    We have a Word merge facility developed in D3 many moons ago which uses our terminal emulators ability to activate windows apps on the client machine such as MS Word. The basic premise is that the merge facility sends a configuration file to the clients' machine in their \Temp folder then activates WinWord with a macro which reads the config file and prints the document named in the config file to the currently selected printer which is the builtin PDF printer (pre COVID it was a physical printer), thus a PDF file. The only problem is that it wants a name and folder to save it to. I currently don't have this automated and the users fill it in themselves at the time of printing. It could of course also be automated via the same activation macro.
    It's not all smooth sailing though. I have found since moving to Office 360, WinWord has to already be running for it to work (properly).
    We use HostAccess as the terminal emulator. It has D3 subroutines which enable the activation of WinWord and Excel, in fact, any app you can find a path to.
    I've used this ability to activate Powershell scripts to do things as well as DOS batch files. I've also used the remote file system interface to execute scripts on the D3 server for various things like emailing and remote internet file transmissions using SFTP.

    I'm happy to discuss these methods with you if you need further assistance.

    Regards,
    Walter

    ------------------------------
    Walter Kiess
    SA Police Super
    ------------------------------



  • 3.  RE: Printing to PDF

    PARTNER
    Posted 01-21-2021 09:01
    Hi Walter,

    For Word if the problem you are getting is that it opens but you cannot open your template and run the script you could try changing Word Options\General\Start up options and untick the "Show the Start screen when this application starts"

    ------------------------------
    Mike Young
    Senior PS Techical Consultant
    Aptean - Sanderson
    ------------------------------



  • 4.  RE: Printing to PDF

    Posted 01-21-2021 17:13
    Thanks, Mike.

    I'll give this a shot.

    ------------------------------
    Walter Kiess
    SA Police Super
    ------------------------------



  • 5.  RE: Printing to PDF

    Posted 01-21-2021 08:37
    We have accomplished this by using a pdf printer setup in CUPS.  We are running D3 on linux so using those tools.   The user runs a small program that does a sp-assign for them and asks for a name and email address for delivery.  When the report is run the printer has been setup to run a cgi script that will generate the output in a pdf format via CUPS and then attach the document to an email and send.  The end of the program reassigns the original printer for the user.  Of course there is a little more magic that must be done but seems to solve the problem.  Be glad to discuss the other magic if needed.

    Craig Curtis
    Sevier School District