Skip to content

GS: Merge Multiple PDFs Into One

Introduction

You may need to merge multiple PDF files to get only one. Here is the solution.

Usage

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf `ls *.pdf`

This command merges all PDF files in the current directory into one PDF file (the out.pdf file).