This article discusses some of the free methods/tools for merging of PDF files.

PDFsam

For GUI based fans, PDFsam is a good choice with an intuitive interface.

MergePdf

MergePdf Powershell module, written by Sergey Pavlyukovich, utilises the PDFsharp .NET open source library for merging of multiple PDFs.

Installation

By default, the Powershell package repository is set as “untrusted”.

PS C:\> Get-PSRepository
PS C:\> Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
PS C:\> Install-Module -Name MergePdf

Syntax and Usage Examples

Syntax details can be found using:

PS C:\> Get-Help Merge-Pdf
PS C:\> Get-Help Merge-Pdf -examples
PS C:\>Merge-Pdf
PS C:\>Merge-Pdf -OutputPath c:\output\out.pdf `
-Path c:\input\in.pdf -Append
PS C:\>Merge-Pdf -OutputPath c:\out\out.pdf
PS C:\>Merge-Pdf -Path c:\input\ -OutputPath c:\output\out.pdf
PS C:\>'c:\file1.pdf' ,'c:\file2.pdf' | `
Merge-Pdf -OutputPath c:\out.pdf

Ghostscript

Ghostscript can be downloaded from here. Once downloaded, complete the installation and add the bin directory (in the case of Windows, the default is C:\Program Files\gs\gs9.50\bin) to your system PATH.

c:\>gswin64 ^
-dBATCH ^
-dNOPAUSE -q ^
-sDEVICE=pdfwrite ^
-dPDFSETTINGS=/prepress ^
-sOutputFile=YourOutputPdfFile.pdf ^
YourInputfile1.pdf ^
YourInputfile2.pdf

Learner. Interests include Cloud and Devops technologies.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store