append_pdfs

Append/concatenate multiple PDF files into a single file using Ghostscript.

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This function appends multiple PDF files to an existing PDF file, or concatenates them into a PDF file if the output file doesn't yet exist. This can be much faster than appending PDFs one at at time.
This function requires that you have ghostscript installed on your system. Ghostscript can be downloaded from: http://www.ghostscript.com

It also includes code from the export_fig package to interface with Ghostcript.

This function is now included in the export_fig package:
http://www.mathworks.com/matlabcentral/fileexchange/23629
The version here will not be maintained.

Cite As

Oliver Woodford (2026). append_pdfs (https://www.mathworks.com/matlabcentral/fileexchange/31215-append_pdfs), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: export_fig

Inspired: Card generator for Codenames board game

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.6.0.0

Update description as added to export_fig package

1.5.0.0

Added more syntax examples.

1.3.0.0

Improve quality of bitmaps. Thanks to Martin Wittmann for pointing out the issue.

1.2.0.0

Fixed bug affecting long commands. Thanks to Michael Teo for reporting it.

1.1.0.0

Bug fix to ghostscript.m mostly affecting Linux (thanks to Paul Durack for reporting it).

1.0.0.0