Copy link to clipboard
Copied
I am quite new to using the acrobat SDK, so I am wondering what might be the solution here. I have a website and a database that tracks the status of individual published documents, and things obviously change over time and they were made legacy. Is it possible that I dynamically add a watermark with some text saying "Legacy" or something along those lines by dynamically manipulating the file on a client side script based on say, a js array query pulled from the db?
Copy link to clipboard
Copied
No, not possible. JS in PDF files can't access a database.
Copy link to clipboard
Copied
But if I have a site that can access a db, and use that site to pull the pdf file and manipulate it, is that possible?
Copy link to clipboard
Copied
That would be a server side solution. Acrobat is not suitable or licensed for server use, so that's out.
Copy link to clipboard
Copied
If you have the PDF the server, populate it with the data from the DB on-the-fly and then serve it to the user it could work, but I don't see how that is a solution to your issue, as the file won't be able to update itself later on.
Copy link to clipboard
Copied
Actually, that is precisely what I need. I can simply add a date stamp to when it was accessed and what status it was at that time and that would be good enough. I just don't want people saving legacy files and using them with no idea that it may no longer be current. Yes, it won't update itself when saved, but I can't prevent people from printing pages either so I am less so concerned as that will always be a problem with a copy that is not provided by the server.
Copy link to clipboard
Copied
What would be a high level guide line how that can be done?
Say I already have the status of the file in js - how would I populate it on a page with a PDF object that acts as if it is a PDF being opened on the browser? Or would it need to actually save the PDF file in a temporary directory when the user accesses it?