Is it possible to join pdf files with MATLAB?

45 ビュー (過去 30 日間)
Mr M.
Mr M. 2017 年 12 月 29 日
編集済み: Franco Dave 2021 年 11 月 22 日
Is it possible to join pdf outputs (plots or pictures/images) into a single pdf file with MATLAB?
  4 件のコメント
Jennifer Toney
Jennifer Toney 2021 年 8 月 31 日
how do you do that with 2 scritp files?

サインインしてコメントする。

採用された回答

Rik
Rik 2017 年 12 月 29 日
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.
\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-]{name_of_pdf_file1.pdf}
\includepdf[pages=-]{name_of_pdf_file2.pdf}
\end{document}
(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)

その他の回答 (3 件)

Jan
Jan 2017 年 12 月 29 日
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 件のコメント
Mr M.
Mr M. 2018 年 4 月 5 日
raster images, but I want to control the pdf image representation and compression

サインインしてコメントする。


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

Abhishek Shahi
Abhishek Shahi 2021 年 8 月 31 日
if you intend you merge several pdf files into one, use my code pdfmerge.

Community Treasure Hunt

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

Start Hunting!

Translated by