How to Combine PDF Files on Windows and Linux

You probably have many PDF documents stored in your computer. One of the best ways to organize them is to combine PDF files. When you combine/merge multiple PDF files into a single PDF, it is easier to manage, access, and back up. PDFtk Server is a command line tool that allows you to easily combine multiple PDF files into one.

Alternatively, you can combine all of your documents in Microsoft Words and export them to a PDF.

How PDFtk Works

PDFtk stands for "PDF Toolkit." PDFtk Server allows you to merge PDF documents, split PDF pages into new documents, rotate PDF pages, decrypt and encrypt, update metadata, apply watermarks, and much more. It is free, open source software available for Windows, Linux, and macOS. Best of all, it does not require Acrobat or any other Adobe products to work.

Note: there is also a PDFtk Free, applicable only for Windows. It's a graphical interface that allows you to add multiple PDF files and merge them into one.

How to Install PDFtk on Linux

For Linux (using Ubuntu), you can install it with the command:

sudo snap install pdftk


sudo apt install pdftk

PDFtk is also available in most repositories, so you can easily install it from your package manager/Software Center.

How To Merge Pdf Files On Windows And Linux With Pdftk

Using PDFtk to Combine Multiple PDFs

  1. Open a terminal.
  2. Change to the directory containing your PDF files:
cd ~/pdf-directory
  1. Decide in which order you want the PDF files to appear in the final document. You will use that order when typing the command line string.
  2. Type the following command, listing your PDF files in the order you want them to appear:
pdftk file1.pdf file2.pdf file3.pdf cat output newfile.pdf

That is all it takes. Be sure to check the new PDF file to be sure all of the new pages display correctly. The merging process is seamless, painless, and should work on any regular PDF files you have.

To combine multiple documents in a directory without listing each one, use wildcards (*):

pdftk *.pdf cat output newfile.pdf

How to Split, Encrypt, and Decrypt PDFs Using PDFtk

As an added bonus, PDFtk can perform many other tasks. For example, to split a PDF file's pages into multiple documents, run the following command:

pdftk newfile.pdf burst

This will split the document into single pages that you can manipulate as you see fit.

With PDFtk, you can even merge certain pages from multiple documents into one new document. To do so, enter the following command:

pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf

In this case, "A" and "B" are used as "handles" for the names of your documents. You can use as many as you need.

Encrypting and decrypting your PDF file

To encrypt your new PDF file, use the following command:

pdftk mydoc.pdf output mydoc_encrypted.pdf owner_pw foopass

where "foopass" is the password you use to encrypt the file. Change to a more secure password for your own usage.

On the other hand, if you have an encrypted PDF file, you can also decrypt it with PDFtk:

pdftk mydoc_encrypted.pdf input_pw foopass output mydoc_decrypted.pdf

This only touches the surface of the many functions of PDF manipulation available with pdftk. You can use pdftk --help or access the online examples to get a good overview of the command.

Note: here is another way to remove passwords from PDF files in Windows.

Using PDFtk Free on Windows

While you can use the command line version of PDFtk on Windows, PDFtk Free offers an easier-to-use graphical interface. The great part is that both PDFtk Server and PDFtk Free come together in a single installation, so you get both. Feel free to use either option. The following instructions, though, apply to PDFtk Free.

The free version doesn't have quite as many features but does still merge PDFs together. The premium upgrade is just $3.99 if you want to switch.

How To Merge Pdf Files On Windows And Linux With Pdftk Windows

Press "Add PDF" to add the PDF files you want to merge. Files are added to the list in the order you select them, but don't worry about the order right now.

How To Merge Pdf Files On Windows And Linux With Pdftk Windows Add

Once added, simply drag and drop the files to create the order you want. You can also double-click the "Pages to Copy" field to select any pages you want to copy in your merged PDF. Use the "Copy Selection" and "Remove Selection" buttons to copy a selection to add it twice or remove a selection.

When you're ready, press "Create PDF" at the bottom of the window. You can also choose to open the newly created PDF or show the location of the PDF in the "Afterwards" drop-down menu.

How To Merge Pdf Files On Windows And Linux With Pdftk Windows Create

Tip: If you are looking for ways to modify the text in a PDF file, here are some ways you can do it.

Combine PDF Files With PDFTK Builder

Another option is to use PDFTK Builder. It's another version of PDFtk that works similarly but is not created by PDFtk. Multiple versions of PDFTK Builder exist online, but one of the best is the portable app version.

  1. Download PDFTK Builder from PortableApps.
  2. Install the app as usual. However, it doesn't actually install. Instead, it unpacks into a folder that you can copy onto a flash drive and take with you anywhere.
  3. Open the PDFTKBuilderPortable folder and open the "PDFTKBuilderPortable" executable file.
How To Combine Pdf Files On Windows And Linux Portable
  1. Join is the default screen, which is what you'll use to combine PDF files on Windows. Simply click "Add" to add your files.
How To Combine Pdf Files On Windows And Linux Portable Join
  1. You can move PDF files up and down to get the order you want before merging them.
  2. Click "Build" to merge your PDF files.

Using PDF Arranger to Merge PDF Files on Linux and Windows

If you find PDFtk too complicated for you, another application you can use to merge PDF files is PDF Arranger.

PDF Arranger is a fork of the old pdfshuffler and small python-gtk application that allows the user to merge or split PDF documents and rotate, crop and rearrange their pages using a simple graphical interface.

You can install PDF Arranger from the Software Center or your package manager. For Windows, you can download the msi installer here.

  1. Open PDF Arranger.
  2. Click the "Open a file" icon. Select the PDF files you want to combine.
Pdf Arranger
  1. From here, you can drag to arrange the PDF pages. You can also delete pages from the file or even rotate and crop.
  2. Once you are done, save it to a new file.

Beyond Merging PDFs

Merging PDFs is great and all, but there's so much more PDFtk is capable of. Naturally, PDFtk Free is limited, but one thing you can still do in both PDFtk Server and PDFtk Free is split PDFs.

  1. For PDFtk Free, select the PDF you want to split.
  2. Double-click the "Pages to Copy" field.
  3. Select the page numbers or range for the first section you want to split. You can save the split portion using a new name to avoid replacing the original PDF.
  4. Repeat the process to split the file into multiple parts.
How To Merge Pdf Files On Windows And Linux With Pdftk Windows Split

For Linux, you'll need to remove pages from the output file. You can remove as many pages as you need. Use the following as an example:

pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf

Other things you can do with PDFtk Free include:

  • Rotate (premium only)
  • Add stamps or watermarks (premium only)
  • Encrypt documents (premium only)

Other things you can do with PDFtk Server (both Linux and Windows) include:

  • Rotate pages
  • Encrypt and decrypt pages
  • Fill out PDF forms
  • Add stamps and watermarks
  • Repair corrupted files (not always possible but does recover the file if possible)
  • Add PDF bookmarks and metadata
  • Break a PDF into single pages
  • Unpack attachments
  • Attach files to PDF documents

As you can see, this seemingly simple tool can do so much more than merge PDF files. Once you get the hang of the commands, it's a great all-in-one PDF utility.

In addition to merging, you can also compress your PDF documents in both desktop and mobile.

Use LibreOffice Draw

If you already use LibreOffice as a Microsoft Office alternative, just use LibreOffice Draw to combine your files. While Writer doesn't let you do this, Draw does. If you prefer using LibreOffice Writer over Microsoft Word, check out this keyboard shortcuts guide.

  1. Open LibreOffice Draw. If you don't have LibreOffice, you can download it for free.
  2. Go to "File -> Open." Browse to one of the PDF files you want to combine. Only open one file.
How To Combine Pdf Files On Windows And Linux Libre
  1. Once your PDF has loaded, open a new instance of LibreOffice Draw.
  2. Open your second PDF in the new instance of LibreOffice Draw.
  3. From here, you have two options. You can either copy and paste from one instance to another or drag one window until it clicks to the left side of your screen and the other window until it clicks to the right side of your screen. Then, drag and drop your PDF page(s) from one screen to the other. I'm using the copy and paste method just because it's simpler.
  4. In either LibreOffice Draw window, click the first PDF page in the list. If you only have one page, just click it. To select all your pages, press Ctrl + A to select all, then press Ctrl + C to copy them. All your pages (technically slides now) should be highlighted in blue.
How To Combine Pdf Files On Windows And Linux Libre Copy
  1. In the other LibreOffice Draw window, select where you want to add your PDF file page(s).
  2. Right-click and select "Paste" or just press Ctrl + V to paste your PDF into the existing one. I chose to place my pages at the end.
How To Combine Pdf Files On Windows And Linux Libre Paste
  1. If the files have different page sizes, you'll be asked whether you want to resize the pages. Click "No" if the message appears. Otherwise, you may lose some text or images.
  2. Repeat the process to add in more PDF files. LibreOffice Draw treats each page as a separate slide, so make sure you copy and paste all of the slide pages to combine your full PDF file with another.
  3. In your main Draw window where you've copied all your PDF files together, go to "File -> Export As -> Export as PDF."
How To Combine Pdf Files On Windows And Linux Libre Export
  1. Select any special options you may want, such as compressing image files to make the overall file size smaller. If you don't want to make any changes, just press "Export" and choose where to save your file.
How To Combine Pdf Files On Windows And Linux Libre Choices

Other Tools to Combine PDF Files on Windows and Linux

While this post focuses mainly on PDFtk, it's not your only option. It's just easy to use and highly effective. But, if you'd rather branch out and try something else, give these tools a try:

  • ImageMagick – this tool is mainly for image editing and optimization, but it also features a PDF merger tool. It's free to use and cross-platform across Linux, Windows, macOS, iOS, and Android.
  • Ghostscript – this command line utility lets you manipulate PDF, XPS, and PostScript files. It's designed for Linux but can be implemented in Windows too.
  • Pdfmod – this command line utility lets you quickly combine PDF files.
  • pdfunite – another command line utility that does exactly what it says. It unites PDF files in Linux.
  • PDF Chain – this is actually another GUI version of PDFtk, but it's an older tool and doesn't always work well on newer systems. However, if you have an older version of Windows or Linux, this could be a great option.
  • pdfshuffler – this Linux tool lets you merge, split, and crop PDF files. It's very basic but serves its intended purpose.

Lastly, you can also combine multiple PDFs on your iPhone.

Frequently Asked Questions

How can I make using the command-line version of PDFtk easier on Windows?

The most difficult part is typing the entire file path name. Open the GUI version, add your files to it, then drag and drop them into the command prompt one at a time to copy the file path over.

What PDFtk commands are available?

While command-line examples have been linked above, the PDFtk Server Manual gives you a more comprehensive look at the various commands to work with all of the features.

Is PDFtk really free?

Yes, but there are premium options available. You can buy PDFtk Pro for the full GUI version, but that's not necessary to merge or split PDFs.

Also, if you need commercial support for use in a business, you can purchase a one-year service agreement for $79/year.

Is PDFtk secure?

While PDFtk isn't going to try to steal your information or anything similar, it's not the best tool for encrypting PDF files. It only supports up to 128-bit encryption, which is better than nothing but still not optimal for highly sensitive information like banking details. Ideally, you want at least AES 256-bit encryption instead.

You can still use PDFtk or any other tool in this post to combine PDF files, then use another tool to encrypt them.

Image credit: Pixabay

Crystal Crowder

Crystal Crowder has spent over 15 years working in the tech industry, first as an IT technician and then as a writer. She works to help teach others how to get the most from their devices, systems, and apps. She stays on top of the latest trends and is always finding solutions to common tech problems.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox