Is it possible to join pdf files with MATLAB?

71 views (last 30 days)
Is it possible to join pdf outputs (plots or pictures/images) into a single pdf file with MATLAB?
Jennifer Toney
Jennifer Toney on 31 Aug 2021
how do you do that with 2 scritp files?

Sign in to comment.

Accepted Answer

Rik on 29 Dec 2017
I don't know an easy way with Matlab, but you can trivially solve this with pdfLaTeX. You can even build this file with Matlab.
(the pages=- switch means that it will include all pages, not just the first)
Save this as a .tex file, install MikTeX (or any other package manager) and run pdflatex your_file_name.tex in your command prompt (or with system from Matlab)

More Answers (3)

Jan on 29 Dec 2017
What are the inputs? Existing PDF files or a set of figures? For the latter, you can print to a PS file with the '-append' flag at first and use the free GhostScript to convert the PS to a PDF file. This is done e.g. in the famous export_fig also.
  1 Comment
Mr M.
Mr M. on 5 Apr 2018
raster images, but I want to control the pdf image representation and compression

Sign in to comment.

Nikhil Sapre
Nikhil Sapre on 10 Nov 2021
Release 2021b now supports exporting to a multipage pdf using the exportgraphics function

Abhishek Shahi
Abhishek Shahi on 31 Aug 2021
if you intend you merge several pdf files into one, use my code pdfmerge.


Find more on Printing and Saving in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!