Hi All
I just want to know if it is at all possible to merge PDF files using LC script without external command line tools, or is there a reliable External or library that one could use to achieve this that gives one the ability to let the user select the order in which the files are merged(Windows Environment). I do apologize if this was discussed in previous posting but I failed to locate any.
Peter G
Merging PDF Files
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Merging PDF Files
Not as far as I know. This is as good a solution as I think is possible :
http://forums.livecode.com/viewtopic.ph ... 7&p=154251
http://forums.livecode.com/viewtopic.ph ... 7&p=154251
Re: Merging PDF Files
Thanks for the reply
Currently using a third party tool called "pdftk" to merge PDF files.
Here is my code:
I gues I have to work on a script that will produce the shell string to look something like this:
"get shell( "pdftk 1.pdf, 2.pdf, 3.pdf, 4.pdf output combined.pdf")"
Thanks
Peter G
Currently using a third party tool called "pdftk" to merge PDF files.
Here is my code:
Code: Select all
ask question "Type in the name of the file. (name.PDF)" titled "Merge File Name"
put it into gFilename
get shell( "pdftk *.pdf output combined.pdf")
end mouseUp
"get shell( "pdftk 1.pdf, 2.pdf, 3.pdf, 4.pdf output combined.pdf")"
Thanks
Peter G
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Merging PDF Files
The docs:
https://www.pdflabs.com/docs/pdftk-man-page/
"Merging" is not the default operation, you have to use the operation "cat" and name all files to merge/cat in the correct input order. There are examples listed.
For me it works best to try first from the commandLine/Terminal, then use LC with the working line or build an appropriate line by script.
https://www.pdflabs.com/docs/pdftk-man-page/
"Merging" is not the default operation, you have to use the operation "cat" and name all files to merge/cat in the correct input order. There are examples listed.
For me it works best to try first from the commandLine/Terminal, then use LC with the working line or build an appropriate line by script.
shiftLock happens
Re: Merging PDF Files
Many Thanks
Have in the meantime started playing with the "cat" option.
I have to present the user with the list of PDF files in a selected folder and somehow get the user to set / select the order to build the command line.
Am I correct in thinking along these lines or should I choose another approach.
Many thanks for the advice
Peter G
Have in the meantime started playing with the "cat" option.
I have to present the user with the list of PDF files in a selected folder and somehow get the user to set / select the order to build the command line.
Am I correct in thinking along these lines or should I choose another approach.
Many thanks for the advice
Peter G