LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-11-2013, 10:55 AM   #1
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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
 
Old 03-11-2013, 11:04 AM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Here you are - pdftk:
http://slackbuilds.org/repository/14.0/office/pdftk/
 
2 members found this post helpful.
Old 03-11-2013, 11:04 AM   #3
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
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

Last edited by BroX; 03-11-2013 at 11:05 AM.
 
1 members found this post helpful.
Old 03-11-2013, 11:06 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,709

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
What about pdftk or ghostscript?
 
1 members found this post helpful.
Old 03-11-2013, 11:15 AM   #5
nivieru
Member
 
Registered: Feb 2008
Posts: 78

Rep: Reputation: 14
Try pdfunite
 
1 members found this post helpful.
Old 03-11-2013, 11:35 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-11-2013, 11:49 AM   #7
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,178

Rep: Reputation: 236Reputation: 236Reputation: 236
Quote:
Originally Posted by markush View Post
... But is it correct that a stock Slack-install comes without any of this tools?
Post #4 has already suggested gs.
 
Old 03-11-2013, 11:58 AM   #8
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
Here's a snippet using gs:

Code:
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=<newfilename>.pdf <inputfilenameshere>
cheers,
 
1 members found this post helpful.
Old 03-11-2013, 12:05 PM   #9
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-11-2013, 12:13 PM   #10
angryfirelord
Member
 
Registered: Dec 2005
Distribution: Fedora, CentOS
Posts: 515

Rep: Reputation: 66
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.
 
Old 03-11-2013, 12:15 PM   #11
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
Quote:
Originally Posted by markush View Post
...
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.

Last edited by BroX; 03-11-2013 at 12:18 PM.
 
1 members found this post helpful.
Old 03-11-2013, 12:22 PM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Evidently TIMTOWTDI.
 
Old 03-11-2013, 04:41 PM   #13
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-11-2013, 06:12 PM   #14
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
And there is pdfjoin as well

jlinkels
 
1 members found this post helpful.
Old 03-11-2013, 06:23 PM   #15
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
And just for fun here is a script that combines .pdf files into a single bookmarked file http://www.linuxquestions.org/questi...ml#post4382364
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] merge pdf files with each file as a index entry in the big pdf ununun Linux - General 4 12-08-2017 07:23 AM
software for merging pdf files Diamantis Linux - Software 5 06-27-2008 04:13 PM
Tool to convert PDF files to office and vice versa linuxlover.chaitanya Linux - Software 2 05-01-2008 10:31 AM
Merging ,pdf files satimis Linux - General 6 11-21-2007 08:31 PM
Merging Two Files using C++ ckoniecny Programming 5 09-26-2006 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration