Is it possible to join pdf files with MATLAB?

Is it possible to join pdf outputs (plots or pictures/images) into a single pdf file with MATLAB?

4 comentarios

KALYAN ACHARJYA
KALYAN ACHARJYA el 29 de Dic. de 2017
I don't think so. Another way you have developed it on your own. Why do you use some online or small pdf merger tools for doing that? like foxit reader, pdf creator or Adobe latest version itself.
Franco Dave
Franco Dave el 31 de Mzo. de 2018
Editada: Franco Dave el 22 de Nov. de 2021
Yes, you can do it using free merge pdf tool which does the job simply :)
Nickolas Blank
Nickolas Blank el 16 de Sept. de 2020
type:
publish('my_first_script.m','pdf')
into your command window, of course using the title of your script in the my first script section and then it will merge any plots you have made with that script and that script into one single file.
Jennifer Toney
Jennifer Toney el 31 de Ag. de 2021
how do you do that with 2 scritp files?

Iniciar sesión para comentar.

 Respuesta aceptada

Rik
Rik el 29 de Dic. de 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.
\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)

Más respuestas (3)

Jan
Jan el 29 de Dic. de 2017

1 voto

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 comentario

Mr M.
Mr M. el 5 de Abr. de 2018
raster images, but I want to control the pdf image representation and compression

Iniciar sesión para comentar.

Nikhil Sapre
Nikhil Sapre el 10 de Nov. de 2021

1 voto

Release 2021b now supports exporting to a multipage pdf using the exportgraphics function
Abhishek Shahi
Abhishek Shahi el 31 de Ag. de 2021

0 votos

if you intend you merge several pdf files into one, use my code pdfmerge.

Categorías

Más información sobre Printing and Saving en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 29 de Dic. de 2017

Editada:

el 22 de Nov. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by