Using pdftk to get all first pages of many pdf's into one pdf document
Hallo all,
I have about 100 randomly named pdfs in a directory and I wish to compile a document consisting of the first page of every one. I normally use pdftk with a command like this: pdftk A=first.pdf B=second.pdf C=third.pdf cat A1 B1 C1 output combined_firstpages.pdf Could you please help me with the correct syntax to get output from ls *.pdf into that command? I been trying with the 'read' command which is what I normally use in this kind of circumstance but it just ain't working and I currently feel as if my head is going to explode. many thanks to anyone who can help sort this. Adam |
Hi
pdftk is not very good for this task. The handles can be only one letter and must be an uppercase letter, so only A-Z is possible. But it can be done by making a temporary directory, extract page 1 of every PDF into a separate file in that directory, and then join all those PDF files into a big one. Here is a little script that does the job: Code:
#!/bin/sh |
All times are GMT -5. The time now is 05:48 AM. |