Hi all,
We have a challenge where we're being requested to time stamp PDFs that we upload to AEM. Currently, I have written a script in Acrobat that adds the date automatically when the PDF is first opened (as long as the form is cleared before uploading). Problem is, it only works for the very first time it's accessed. Everyone that accesses it afterwards sees the same date (the first date it was opened). What I want to happen is every user that accesses it from a different IP address to see the current date. Is that possible in AEM?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @PSURAM ,
Yes, it is possible to dynamically add a timestamp to PDFs uploaded to AEM. However, it requires a different approach than using a script in Acrobat. You can achieve this by using AEM's capabilities to modify and render PDFs on the server side.
Here's a high-level overview of how you can implement this:
Create a custom workflow in AEM to handle the PDF upload process. This workflow will be triggered when a PDF is uploaded to AEM.
Within the custom workflow, add a step to modify the PDF and add the timestamp. You can use a custom workflow step or an existing out-of-the-box step, such as the "Modify PDF" step provided by AEM Forms.
In the workflow step, use a server-side PDF manipulation library, such as Apache PDFBox, to add the timestamp to the PDF. You can write custom code to open the PDF, add the timestamp to the desired location, and save the modified PDF.
Once the PDF is modified and saved, continue the workflow to store the modified PDF in AEM.
Hi @PSURAM ,
Yes, it is possible to dynamically add a timestamp to PDFs uploaded to AEM. However, it requires a different approach than using a script in Acrobat. You can achieve this by using AEM's capabilities to modify and render PDFs on the server side.
Here's a high-level overview of how you can implement this:
Create a custom workflow in AEM to handle the PDF upload process. This workflow will be triggered when a PDF is uploaded to AEM.
Within the custom workflow, add a step to modify the PDF and add the timestamp. You can use a custom workflow step or an existing out-of-the-box step, such as the "Modify PDF" step provided by AEM Forms.
In the workflow step, use a server-side PDF manipulation library, such as Apache PDFBox, to add the timestamp to the PDF. You can write custom code to open the PDF, add the timestamp to the desired location, and save the modified PDF.
Once the PDF is modified and saved, continue the workflow to store the modified PDF in AEM.
Thank you! I will speak with our developers and see if we can make it work.
I think in the init event, the script should always take the current date from the system.
Views
Likes
Replies