Alfresco: Alfresco PDF Tool Kit – Insert PDF Action
I’ve taken a bit of Holiday time to update the Alfresco PDF Toolkit. Nate has been doing an outstanding job adding Watermarking, Digital Signatures, Encryption and cleaning up my messy code. But it was time to add a little bit myself.
So I took sometime this evening to add in one of my planned actions: Insert PDF. This action allows you to insert a PDF into another PDF at a specific page.
This is a pretty straight forward action to test: From the Document Details page of the PDF you want to insert content into, select Run Action (This action can also be run through the rules engine or scripted).
From the list of Actions you’ll want to select Insert PDF.
Now you will want to set the parameters for the insert. There are 4 parameters for an insert:
- Name: This is the name of the new file that will be generated. No extension is needed, it will automatically be added.
- Destination: Space where the new file will be stored.
- Insert at page: Where page 1 of the inserted PDF will start in the targeted PDF.
- Insert: The PDF to insert into the targeted PDF
Finally, you’ll get a message summarizing the action you are taking
See pretty simple!
The latest amp and source can be found at the Alfresco PDF Toolkit project site.



Hi Jared!
First of all, thanks for this useful toolkit.
Currently, I’m using it for a developmente, and I realized that it only works once. I mean, the first time it’s added a file to the space it works correctly, but next time it’s added a file the following error is shown “Failed to create content due to error: null id in org.alfresco.repo.domain.hibernate.ChildAssocImpl entry (don’t flush the Session after an exception occurs)”
Likely, the problem is because of the name of the file to be generated is the same always.
Is there any way to fill the field Name with a variable name?
Thanks in advance!
jorge
26 Jan 11 at 4:07 am edit_comment_link(__('Edit', 'sandbox'), ' ', ''); ?>
Glad to know it is useful! Can you tell me which version of Alfresco you are using, which version of the plugin you are using and which action is causing this issue?
jared
26 Jan 11 at 4:29 am edit_comment_link(__('Edit', 'sandbox'), ' ', ''); ?>
The Alfresco version is 3.3, and plugin version is 0.97.
I’ve seen this issue in MergePdf action and InsertPdf action.
In action WatermarkPDF it doesn’t happen.
jorge
26 Jan 11 at 5:03 am edit_comment_link(__('Edit', 'sandbox'), ' ', ''); ?>