Add a reprint text in PDF for Perspective

Hi. I am working in Perspective using WebDev license I mounted a folder from my server and i am able to see some PDFs created by the same App. Is there a way to add a "Reprinted" Message and download the PDF with this added text?

If youd give me some idea on how do this.

Thanks

Just to clarify, do you mean that you are seeing duplicates and want to add reprinted? Or you want to make an endpoint that would download the with the filename having the word reprinted in it?

Yeah, I created a PDF with the App (original) but they need a button which works as reprint report, so I need to go the PDF previously created and just add the word "reprinted" this with the purpose of controling original PDF and copy, its a way they know someone accesed the info and download It.

In my mind at the endpoint where you are retrieving the file from whatever doGet you have created you can just read the file, then write to a new file called "myFile_reprinted".

I do have to mention that if you are trying to track if something is accessed then it would be better practice to utilize a database table or something like that. Having it say "reprinted" gives you zero information other than it was downloaded again.

You have access to the system.db scripting module and can run Named Queries to store and fetch data so you could very easily make a log of that.

See Merge pdf files for details on how to merge PDF files using a command line utility. I presume you could "watermark" your PDFs using that.

Yes I have a DB with some Logs on it, even Audit trail for the buttons. What I want to know is if there is a way to add a header like in the photo. This is part of the procedure they follow. Do you have any idea on how to do something similar? Logs are OK but they need this data on the printout

No, there is nothing built into Ignition that can do this.

If your PDFs are created by Ignition's reporting module, consider not storing them as PDFs, but generate them on the fly every time a user requests one. Then you can use report parameters to pass that information to be included in each generated report.

If not created within Ignition by the reporting module, you will need to use an external executable to watermark the PDF before delivery, as mentioned above. (I would use pdftk, but there are many such tools.)