Welcome to the Slackware Documentation Project

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

es:howtos:software:how_to_merge_pdf-files [2019/02/28 01:46 (UTC)] (actual)
slackwarespanol creado
Línea 1: Línea 1:
 +====== How to merge PDF-files ======
 +
 +===== Introduction =====
 +
 +PDF (Portable Document Format) is a file format invented by Adobe. PDF is useful to present documents independent of hardware, operating system and application software. Each PDF file has a fixed layout, including page size, fonts, graphics and other information. It is also possible to encrypt a PDF file for security, or create a digital signature for authentication.
 +
 +<note important>​Work in Progress!!!</​note>​
 +
 +PDF documents are created from traditional text documents via a printer driver, or as with LaTeX, created directly from source-code. One important consequence is that one cannot convert a PDF-document "​back"​ into it's original format such as a Microsoft Word document.
 +
 +This article describes how you can merge several PDF documents into a single PDF document. For example, this is useful if you have several pages from a scanner in PDF format and want to put these files into one file. There are several tools available; some are included in the stock Slackware install as well as others that can be readily installed.
 +
 +===== Default Tools =====
 +
 +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) ====
 +
 +The ghostscript package resides in Slackware'​s ap-series.
 +
 +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>​
 +Thanks to mrclisdue for the contribution.
 +
 +==== pdfconcat ====
 +
 +The pdfconcat tool comes in Slackware'​s xpaint package from the xap-series.
 +
 +<​code>​pdfconcat -o <​output.pdf>​ <​input1.pdf>​ [...]</​code>​
 +Thanks to BroX for the contribution.
 +
 +==== pdfunite ====
 +
 +The pdfunite tool comes in Slackware'​s poppler package from the l-series.
 +
 +<​code>​pdfunite [options] PDF-sourcefile1..PDF-sourcefilen PDF-destfile</​code>​
 +Thanks to nivieru for the contribution.
 +
 +===== Additional tools =====
 +
 +Additional tools that can be easily installed.
 +
 +==== pdftk ====
 +
 +pdftk is available at [[http://​slackbuilds.org/​repository/​14.0/​office/​pdftk/​|slackbuilds.org]]. It is also a command line tool and the usage is:
 +<​code>​pdftk first.pdf second.pdf third.pdf cat output altogether.pdf</​code>​
 +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>​
 +Thanks to brianL and michaelk for pointing me to pdftk.
 +
 +==== pdfshuffler ====
 +
 +pdfshuffler is also available at [[http://​slackbuilds.org/​repository/​14.0/​office/​pdfshuffler/​|slackbuilds.org]]. It comes with a graphical user interface and is written in Python, therefore [[http://​slackbuilds.org/​repository/​14.0/​python/​pyPdf/​|pyPdf]] and [[http://​slackbuilds.org/​repository/​14.0/​python/​pypoppler/​|pypoppler]] are required in order to get this program to work. It is very convenient because it comes with a document-viewer and shows what you're doing. It has additional features like rotating or splitting PDF files.
 +
 +==== pdfjam ====
 +
 +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>​
 +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>​
 +
 +====== Sources ======
 +<!-- If you are copying information from another source, then specify that source -->
 +<!-- * Original source: [[http://​some.website.org/​some/​page.html]] -->
 +<!-- Authors are allowed to give credit to themselves! -->
 +  * Originally written by [[wiki:​user:​markush | Markus Hutmacher]] ​
 +<!-- * 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.-->
 +{{tag>​howtos PDF commandline}}
  

En otros idiomas
QR Code
QR Code es:howtos:software:how_to_merge_pdf-files (generated for current page)