[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
howtos:software:how_to_merge_pdf-files [2013/03/15 17:30 (UTC)] – Added pdfunite as well as other edits allendhowtos:software:how_to_merge_pdf-files [2013/04/02 14:29 (UTC)] (current) – Added pdfconcat, additional info for convert, altered to one source link allend
Line 14: Line 14:
  
 Tools which are already available on your Slackware computer if you have a complete installation. Tools which are already available on your Slackware computer if you have a complete installation.
 +
 +==== imagemagick (convert) ====
 +
 +The convert tool comes in Slackware's imagemagick package from the xap-series.
 +
 +The convert tool uses the -adjoin option to achieve this.
 +<code>convert -adjoin file1.pdf file2.pdf merged.pdf</code>
 +Thanks to jlinkels for the contribution.
 +
 +To increase the quality of the output, it is better to read the input PDF files with a higher density (in dots per inch (DPI)) and then resize the output density back to common DPI, 96 for example. I usually use an input density of 600 (after many trial and errors), and then resize with 93.75% (if you dont resize you will get a huge output file).
 +<code>convert -density 600 fileinput_1.pdf fileinput2_.pdf -resize 93.75% output.pdf</code>
 +Thanks to eXpander_ for the contribution.
  
 ==== ghostscript (gs) ==== ==== ghostscript (gs) ====
Line 21: Line 33:
 With GhostScript you can merge PDF files on the command line. With GhostScript you can merge PDF files on the command line.
 <code>gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=<newfilename>.pdf <inputfilenameshere></code> <code>gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=<newfilename>.pdf <inputfilenameshere></code>
-Thanks to mrclisdue from [[http://www.linuxquestions.org/questions/slackware-14/|linuxquestions.org]] for the contribution.+Thanks to mrclisdue for the contribution.
  
-==== imagemagick (convert) ====+==== pdfconcat ====
  
-The convert tool comes in Slackware'imagemagick package from the xap-series.+The pdfconcat tool comes in Slackware'xpaint package from the xap-series.
  
-The convert tool uses the -adjoin option to achieve this. +<code>pdfconcat -o <output.pdf> <input1.pdf> [...]</code> 
-<code>convert -adjoin file1.pdf file2.pdf merged.pdf</code> +Thanks to BroX for the contribution.
-Thanks to jlinkels at [[http://www.linuxquestions.org/questions/slackware-14/|linuxquestions.org]]  for the contribution.+
  
 ==== pdfunite ==== ==== pdfunite ====
Line 36: Line 47:
  
 <code>pdfunite [options] PDF-sourcefile1..PDF-sourcefilen PDF-destfile</code> <code>pdfunite [options] PDF-sourcefile1..PDF-sourcefilen PDF-destfile</code>
-Thanks to nivieru at [[http://www.linuxquestions.org/questions/slackware-14/|linuxquestions.org]] for the contribution.+Thanks to nivieru for the contribution.
  
 ===== Additional tools ===== ===== Additional tools =====
Line 48: Line 59:
 pdftk can do more things than joining PDF files, for example rotating a document by 180 degrees is done this way: pdftk can do more things than joining PDF files, for example rotating a document by 180 degrees is done this way:
 <code>pdftk upsidedown.pdf cat 1-endsouth output rotated.pdf</code> <code>pdftk upsidedown.pdf cat 1-endsouth output rotated.pdf</code>
-Thanks to brianL and michaelk at [[http://www.linuxquestions.org/questions/slackware-14/|linuxquestions.org]] for pointing me to pdftk.+Thanks to brianL and michaelk for pointing me to pdftk.
  
 ==== pdfshuffler ==== ==== pdfshuffler ====
Line 58: Line 69:
 pdfjam is a LaTeX-package which is unfortunately **not** included in tetex. But those of us who have installed texlive instead already have pdfjam. It is also a command line tool (like LaTeX). The documentation is available with the texdoc command pdfjam is a LaTeX-package which is unfortunately **not** included in tetex. But those of us who have installed texlive instead already have pdfjam. It is also a command line tool (like LaTeX). The documentation is available with the texdoc command
 <code>texdoc pdfjam</code> <code>texdoc pdfjam</code>
-Thanks to joghi at [[http://www.linuxquestions.org/questions/slackware-14/|linuxquestions.org]] for pointing me to pdfjam.+Thanks to joghi for pointing me to pdfjam.
  
 <note>TODO: handling bookmarks in PDF-files, which of the above tools can handle those bookmarks?</note> <note>TODO: handling bookmarks in PDF-files, which of the above tools can handle those bookmarks?</note>
Line 68: Line 79:
   * Originally written by [[wiki:user:markush | Markus Hutmacher]]    * Originally written by [[wiki:user:markush | Markus Hutmacher]] 
 <!-- * Contributions by [[wiki:user:yyy | User Y]] --> <!-- * Contributions by [[wiki:user:yyy | User Y]] -->
 +http://www.linuxquestions.org/questions/slackware-14/which-tool-for-merging-pdf-files-4175453632/
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 {{tag>howtos PDF commandline}} {{tag>howtos PDF commandline}}
  
 howtos:software:how_to_merge_pdf-files ()