Automatical printing of Reports to PDF after executing them

Hello Community,

I wanted to backup printed documents by automatically saving them to PDF in some location on the drive. Is it even possible?
When the Enduser prints some document with a physical printer they should be automatically saved as PDF in some path
I wanted to code a publisher event function in the CU1, but im not sure if its even possible. Im not a NAV-savy yet.

Best regards
Marcus

Answers

  • KTA8KTA8 Posts: 204Member
    Hello Community,

    I wanted to backup printed documents by automatically saving them to PDF in some location on the drive. Is it even possible?
    When the Enduser prints some document with a physical printer they should be automatically saved as PDF in some path
    I wanted to code a publisher event function in the CU1, but im not sure if its even possible. Im not a NAV-savy yet.

    Best regards
    Marcus

    It is, I don't know your version but the new ones have the possibility to print to pdf. The problem is the automatic idea. Changing that codeunit shouldn't be your first idea.
  • marcussulicmarcussulic Posts: 14Member
    KTA8 wrote: »
    Hello Community,

    I wanted to backup printed documents by automatically saving them to PDF in some location on the drive. Is it even possible?
    When the Enduser prints some document with a physical printer they should be automatically saved as PDF in some path
    I wanted to code a publisher event function in the CU1, but im not sure if its even possible. Im not a NAV-savy yet.

    Best regards
    Marcus

    It is, I don't know your version but the new ones have the possibility to print to pdf. The problem is the automatic idea. Changing that codeunit shouldn't be your first idea.

    Im Using NAV 2016/2018

    Im aware theres a SaveAsPDF Function. The problem is I dont want to programm "SaveAsPDF" in every Report / in every place a report is printed in the system. Its not a good solution and its very time-consuming... is it the only one?

    I thought I could just alter and use the logic that sends the document to the printer. There are a few printer related Functions already in CU1 like "FindPrinter" where you could return the printer name of your choice. Is there a way to define own functions there?
    Is there a way I could get to execute this FindPrinter function twice, so I could print a document once with a printer of choice and the second time as a PDF?
  • Tony_NCDTony_NCD Posts: 4Member
    Check out the Live Links control, available in the Download section. If the Snapshot feature doesn't suffice, with some slight modification, you can easily achieve what you want.
Sign In or Register to comment.