Placing plots into multiple page pdf document

142 ビュー (過去 30 日間)
Aleg 2012 年 11 月 6 日
編集済み: Nikhil Sapre 2021 年 11 月 10 日
I'm a bit stuck at a simple question: how can I create a single pdf file with multiple plots and pages? Multiple page is what I need. I could not find a solution to this simple task in the Internet.
  3 件のコメント
david Miller
david Miller 2019 年 5 月 14 日
Also have this question!



Jonathan Epperl
Jonathan Epperl 2012 年 11 月 8 日
I don't think that Matlab can create multi-page pdfs for you, you'll have to do that yourself. pdfsam is free and does just that.
If you want to do it only occasionally, then you can use the Matlab figure window to export to pdf, and the pdfsam GUI to merge them into a single pdf.
If you want to do it in an automated way from the commandline, then you can use Matlab's print command or one of the many much better functions from the FEX (e.g. and then pdfsam's console interface to merge them. You can call the console interface from the Matlab command line either by
As a third option, you could generate and compile a latex file from the Matlab command line, that's probably what I would do, but it depends on what you're comfortable with.
Btw, this is all assuming you're on Windows, if you're on a Mac, then can do the merging, you don't need pdfsam. For Linux, I'm sure, there is something similar.
  2 件のコメント
Aleg 2012 年 11 月 13 日
Hi Jonathan,
Thanks a lot for the answer. It works. :)


その他の回答 (3 件)

Oliver Woodford
Oliver Woodford 2012 年 11 月 23 日
The append_pdfs function can concatenate separate pdf files into a single document in MATLAB.

jwiix 2016 年 3 月 30 日
I had the same question. the best alternative I came up with programmatically is to use postscript, this allows you to use the append option within the print command:
print(fig_handle, '-dpsc', '-append', 'D:\output_dir\')
if you really require a pdf then you can utilise or equivalent to convert
  1 件のコメント
Ramachandra Rao
Ramachandra Rao 2016 年 5 月 13 日
very useful.. thankyou


Nikhil Sapre
Nikhil Sapre 2021 年 11 月 10 日
編集済み: Nikhil Sapre 2021 年 11 月 10 日
Release 2021b now supports exporting to a multipage pdf using the exportgraphics function


Find more on MATLAB Report Generator 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!

Translated by