I am getting an error when using the append_pdfs function

29 vues (au cours des 30 derniers jours)
Jack Brady
Jack Brady le 13 Mar 2023
Commenté : Roman Rosipal le 25 Juin 2023
I am simply trying to add two figuress to a single pdf. I can create a sepaprate pdf for each figure but when I try to add them both to one pdf I get the following error: Error using append_pdfs
Unterminated quote in @-file: figure2.pdf". This is quite frustrating as I have downloaded Ghostscript and export_fig from the matlab file exchange. I have also added these directories to my matlab path by clicking 'Set Path' and adding the corresponding folders. I have included my code below. Any help would be much appreciated.
% Create multiple figures
addpath('C:\Users\SCS Engineer\Downloads\github_repo');
title('Figure 1');
print('figure1.pdf', '-dpdf')
title('Figure 2');
print('figure2.pdf', '-dpdf')
% % Specify the filename for the PDF file
% filename = 'my_figures.pdf';
% % Create a PDF file with the two figures
% print(filename, '-dpdf', '-bestfit', '-r300', '-painters', 'figure1', 'figure2');
append_pdfs('all_figures.pdf', 'figure1.pdf', 'figure2.pdf')
  8 commentaires
Roman Rosipal
Roman Rosipal le 25 Juin 2023
this seems to be something with the latest realease of Matlab 2023a. It works for me with R2023a Update 1 but not with R2023a Update 3 where I run into the same problem.

Connectez-vous pour commenter.

Réponses (2)

Sai Sumanth Korthiwada
Sai Sumanth Korthiwada le 27 Mar 2023
Hi Jack,
As mentioned in the documentation overview of append_pdfs in File Exchange:
This function is now included in the export_fig package:
The version here will not be maintained.
Please prefer using export_fig package, as this package is maintained and updated frequently. Last update being on 23 Mar 2023. Please refer to the below mentioned link to know more about 'export_fig' or to download 'export_fig' through File exchange:
Hope this helps!

enrico maggiolini
enrico maggiolini le 31 Mar 2023
same problem:
the code is easy:
i obtain a test.pdf file with only 2 files appended and the error:
Error using append_pdfs (line_131)
Unterminated quote in @-file: C:\users\fem\desktop\3.pdf"
what i've noticed is:
-the error is obtained always with the last file of the list, no matter which is it or how many are them and the generated files is missing of this last file
-in the error message there is a " at the end of the file name
  1 commentaire
Corey Slick
Corey Slick le 25 Avr 2023
Same problem and I've noticed the same thing about the last item in the list.

Connectez-vous pour commenter.


En savoir plus sur Debugging and Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by