LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Which tool for merging PDF-files? (http://www.linuxquestions.org/questions/slackware-14/which-tool-for-merging-pdf-files-4175453632/)

markush 03-11-2013 10:55 AM

Which tool for merging PDF-files?
 
Hi,

today I wanted to merge several single-page PDF-files from the scanner into one file. But I could not find a tool on my Slackware-computer. Am I missing something? How do you merge PDF-files?

I tried imagemagick, but it put the pages into small pictures on one larger page. Maybe there is an appropriate option in imagemagick which provides the expected behavior.....

I took also a look at slackbuilds.org, but I did not find an appropriate program there too.

Markus

brianL 03-11-2013 11:04 AM

Here you are - pdftk:
http://slackbuilds.org/repository/14.0/office/pdftk/

BroX 03-11-2013 11:04 AM

pdfconcat
 
What about
Code:

$ pdfconcat
Usage: pdfconcat -o <output.pdf> <input1.pdf> [...]

Code:

$ grep pdfconcat /var/log/packages/*
/var/log/packages/xpaint-2.8.16-x86_64-1:usr/bin/pdfconcat


michaelk 03-11-2013 11:06 AM

What about pdftk or ghostscript?

nivieru 03-11-2013 11:15 AM

Try pdfunite

markush 03-11-2013 11:35 AM

Hi,

thanks for the quick responses, I will install pdftk now.

But is it correct that a stock Slack-install comes without any of this tools?

Markus

guanx 03-11-2013 11:49 AM

Quote:

Originally Posted by markush (Post 4909267)
... But is it correct that a stock Slack-install comes without any of this tools?

Post #4 has already suggested gs.

mrclisdue 03-11-2013 11:58 AM

Here's a snippet using gs:

Code:

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=<newfilename>.pdf <inputfilenameshere>
cheers,

markush 03-11-2013 12:05 PM

I've now installed pdftk and will try it out later.

Thanks also to mrclisdue for the commandline with gs, I did not know this.

I'll follow up here when I've some experience with the tools.

Markus

angryfirelord 03-11-2013 12:13 PM

If you only need to merge docs once in a while, the GUI front-end for PDFTK is nice to use. If you have to merge PDFs on a regular basis, ImageMagick/GraphicsMagick are better for that.

BroX 03-11-2013 12:15 PM

Quote:

Originally Posted by markush (Post 4909267)
...
But is it correct that a stock Slack-install comes without any of this tools?

pdfconcat in #3 is from xpaint which also comes with stock slackware.

brianL 03-11-2013 12:22 PM

Evidently TIMTOWTDI.

markush 03-11-2013 04:41 PM

Well, I've tried pdftk, it works very well but the commands are not very intuitive.

For example rotating a file by 180 degree
Code:

pdftk upsidedown.pdf cat 1-endsouth output rotated.pdf
and joining several files
Code:

pdftk first.pdf second.pdf third.pdf cat output altogether.pdf
But the help option
Code:

pdftk --help
shows helpful examples which makes the tool very useful.

Markus

jlinkels 03-11-2013 06:12 PM

And there is pdfjoin as well

jlinkels

allend 03-11-2013 06:23 PM

And just for fun here is a script that combines .pdf files into a single bookmarked file http://www.linuxquestions.org/questi...ml#post4382364


All times are GMT -5. The time now is 10:43 AM.