

- #Pdf merge linux command line pdf#
- #Pdf merge linux command line install#
- #Pdf merge linux command line update#
Now we will see an example of using ghostscript to combine our two sample PDF documents.
#Pdf merge linux command line install#
To install it, in a terminal we write: sudo apt install ghostscript We can also use ghostscript (gs) to join PDF documents on Ubuntu 18.04. Using our sample files, the command to use would be:Ĭonvert entreunosyceros-1.pdf entreunosyceros-2.pdf rango_paginas_combinadas_convert.pdf Using Ghostscript We could join the first 5 pages of the first file with the first 10 pages of the other. With this command it is also possible join page ranges.

For this the indicated numbers are less than the ones we are interested in.Ĭonvert entreunosyceros-1.pdf entreunosyceros-2.pdf paginas_combinadas_convert.pdf For example, to combine the 5th page of the first document with the 7th and 10th pages of the second document, you would use a command like the following. Using our example PDF files, the command that we will have to use to combine them will be the following:Ĭonvert entreunosyceros-1.pdf entreunosyceros-2.pdf archivos_combinados_convert.pdfįor, combine specific pages of PDF files into one file, we will have to pass to the convert command our files with the specific page numbers in brackets. To use the convert command, first we will have to install Imagemagick, if we don't already have it installed, opening a terminal (Ctrl + Alt + T) and using the following command: sudo apt install imagemagick We continue installing the pdftk tool with the following command: sudo apt install pdftkĪfter the pdftk installation is complete, using our example files, the command to use to combine the PDFs shall be as follows: pdftk entreunosyceros-1.pdf entreunosyceros-2.pdf cat output archivos_combinados_pdftk.pdf Using convert Sudo add-apt-repository ppa:malteworld/ppaĪfter adding the PPA, in Ubuntu 18.04 the software listing will be updated. To do this, we open a terminal (Ctrl + Alt + T) and write: To install pdftk in terminal on Ubuntu 18.04, first we are going to add the PPA from which we will install the tool. Pdftk is yet another tool that can be used to combine PDF documents on Ubuntu 18.04. These are not worrisome, the files will be merged correctly.Īs you can see in the previous screenshot, the output file called combined_file_pdfunite.pdf. The console will show us a handful of warnings at the exit. Using the files I have named above, the command to use would be the following: pdfunite entreunosyceros-1.pdf entreunosyceros-2.pdf archivo_combinados_pdfunite.pdf To perform this action, the files to be merged must be in the same directory where pdfunife is running.
#Pdf merge linux command line update#
Sudo apt update & sudo apt install poppler-utils To install this tool we open a terminal (Ctrl + Alt + T) and write: This is the reason why when you install poppler, pdfunite is already included. Pdfunite is a tool that can be used to join PDF documents.

First of all, in a folder called PDFS, I will include 2 PDF documents to work with with them:
