July 25, 2023

Merge pdf files freely without installing another programme

Using the utility pdfunite

To merge multiple pdf files into a single pdf file with the utility pdfunite, open your terminal and run:

$ pdfunite pdf_sourcefile1 pdf_sourcefile2 pdf_output

pdf_sourcefile1 et cetera are the pdf files you want to merge.

pdf_output is the name of a pdf file that will be created with all pdf files merged once you have run the command.

To learn more about pdftunite run:

$ man pdfunite

pdfunite is copyleft-licensed and was first released in 1995. It was written, and is still developed, by Derek Noonburg1.

Using Ghostscript

You can also use Ghostscript to merge multiple pdf files into one pdf file.

To merge multiple pdf files into one single pdf file run:

$ gs 
-q \ 
-sPAPERSIZE=letter \ 
-dNOPAUSE \ 
-dBATCH \ 
-sDEVICE=pdfwrite \ 
-sOutputFile=merged.pdf \
pdf_sourcefile1 \
pdf_sourcefile2

You can run $ man gs to understand what each option does.

If you don’t know whether Ghostscript is installed on your operating system, on GNU/Linux, you can check by running in your terminal:

$ dpkg -s ghostscript

dpkg is a package manager. The option -s (or –status) prints the status of a programme e.g. whether a program is installed. If so, you should see a line printing:

Status: install ok installed

You can also run:

$ dpkg -s ghostscript | grep installed

grep will print the line that matches keyword installed’.

If you need to install Ghostscript run:

$ sudo apt install ghostscript

Ghostscript is copyleft-licensed and was released in 1988 by L. Peter Deutsch.


  1. xpdfreader’s website.↩︎


personal computing command-line interface (cli) gnu linux trisquel office applications wiki pdf shell literacy

No affiliate links, no analytics, no tracking, no cookies. © 2016-2023 yctct.com. Content is licensed under CC BY-NC-SA 4.0 .