I have a flow, where I need to insert an appendix pdf after every page of a letter pdf.
The number of pages in the appendix pdf is not the same for each run.
The number of recipients in the letter pdf is also variable.
My solution now is to split the letter pdf. Using the command line tool PDFTK I insert the appendix pdf. The job is then assembled and merge to a new pdf-file.
This works but can be very slow, if there are many recipients.
So I was curious if any one had a good tool for this?
Add appendix pdf after every page of letter pdf
- JimmyHartington
- Advanced member
- Posts: 312
- Joined: Tue Mar 22, 2011 7:38 am
- JimmyHartington
- Advanced member
- Posts: 312
- Joined: Tue Mar 22, 2011 7:38 am
Re: Add appendix pdf after every page of letter pdf
So I found a solution based on a Acrobat javascript.
Now I use the Acrobat configurator.
This is the script.
Arguement 1 is the name of the appendix-file.
It is faster than my previous solution, but still not as fast as I would like.
What I would like was some kind of commandline utility.
Now I use the Acrobat configurator.
This is the script.
Code: Select all
/* Add blank page for script to work */
$doc.newPage(0, 100, 100);
/* add page after each nth page */
var n = 1;
for (var i=$doc.numPages-1; i>0; i--) {
if ((i+1) % n == 0) {
$doc.insertPages(i, "/path/to/appendix/pdf-file/" + $arg1);
}
}
/* Delete first page */
$doc.deletePages({nStart: 0, nEnd: 0});
It is faster than my previous solution, but still not as fast as I would like.
What I would like was some kind of commandline utility.
Re: Add appendix pdf after every page of letter pdf
We can do this using callas pdfToolbox CLI.
--
Sebastian Nafroth +++ 3f8h.net / electronic publishing
3f8h.net offers professional services and products for the graphic arts
industry.
contact details: http://www.3f8h.net/kontakt
Sebastian Nafroth +++ 3f8h.net / electronic publishing
3f8h.net offers professional services and products for the graphic arts
industry.
contact details: http://www.3f8h.net/kontakt
- JimmyHartington
- Advanced member
- Posts: 312
- Joined: Tue Mar 22, 2011 7:38 am
Re: Add appendix pdf after every page of letter pdf
How is it done with pdfToolbox CLI?
Re: Add appendix pdf after every page of letter pdf
Quite Imposing - insert pages ('from file' at interval).
Done.
Done.
- JimmyHartington
- Advanced member
- Posts: 312
- Joined: Tue Mar 22, 2011 7:38 am
Re: Add appendix pdf after every page of letter pdf
@Arthur
Thanks. But I do not have Quite Imposing for my server.
It needs to be done automatic.
Thanks. But I do not have Quite Imposing for my server.
It needs to be done automatic.
Re: Add appendix pdf after every page of letter pdf
Well - it can be automated with Quite Hot Folders. But I presume you do not have that one either....
We've been using Quite for years and it was a natural choice to keep things that way when we implemented Switch. But I understand not everyone has got it, in favour of other tools.
Yet - this seemed the most straightforward solution to me....
We've been using Quite for years and it was a natural choice to keep things that way when we implemented Switch. But I understand not everyone has got it, in favour of other tools.
Yet - this seemed the most straightforward solution to me....
Re: Add appendix pdf after every page of letter pdf
Do you have pdfToolbox CLI installed and licensed?
--
Sebastian Nafroth +++ 3f8h.net / electronic publishing
3f8h.net offers professional services and products for the graphic arts
industry.
contact details: http://www.3f8h.net/kontakt
Sebastian Nafroth +++ 3f8h.net / electronic publishing
3f8h.net offers professional services and products for the graphic arts
industry.
contact details: http://www.3f8h.net/kontakt
- JimmyHartington
- Advanced member
- Posts: 312
- Joined: Tue Mar 22, 2011 7:38 am
Re: Add appendix pdf after every page of letter pdf
@3f8h.net: No. I do not have a license for pdfToolbox CLI.