I have a creative commons license in one
license.pdf. I want to merge this
license.pdf as a first page in another
pdftk license.pdf t2.pdf output t2merged.pdf
But, I am having more than 4000
license.pdf to all of the 4000
I tried. the following outputs came in the terminal.
info-farmer-lm17mate@64bit-Lenovo-Flex-2-14 ~/Desktop/LICENSEs $ sudo chmod u+x add-license.sh [sudo] password for info-farmer-lm17mate: info-farmer-lm17mate@64bit-Lenovo-Flex-2-14 ~/Desktop/LICENSEs $ ./add-license.sh Error: Unable to find file. Error: Failed to open PDF file: edits/files/2mergedpdffile.pdf Done. Input errors, so no output created. Error: Unable to find file. Error: Failed to open PDF file: edits/files/A_Vocabulary_of_English_and_Tamil_Words-google.pdf Done. Input errors, so no output created.
@0x450 still facing the same error as above
Let's assume that all of your "4000"
.pdffiles are located in a single directory (for example
files) and the
license.pdfis directly outside this folder. Then you could easily iterate through each file and concatenate it with your license. This script should do the trick:
At the end all modified files will be contained in the folder
edits, which is at the same level as
Make the script executable with
chmod u+x name-of-the-scriptand run it with
./name-of-the-scriptand don't forget to place it in the same directory where the
license.pdffile is stored.