Hello all, I am using PS2PDF with Ghostscript and appending multiple images to ps and converting into pdf. I get an error when i run it, the error is :
//Problem converting Postscript, system returned error 1. "" Is not a recognized internal or external command.//
I can convert it into postscript with print option and commenting out the ps2pdf, Please help me on this one.

回答 (2 件)

Jan
Jan 2017 年 4 月 3 日
編集済み: Jan 2017 年 4 月 3 日

0 投票

If you post the code you are using, an answer would not be based on guessing only.
I assume, the path of your file or executable contains a space. Then include the path in double quotes:
system('"C:\Program files\Ghost\ps2pdf" "C:\Folder with spaces\File.ps"')
(Of course this is an example only, adjust it to the real names.)

5 件のコメント

Jan
Jan 2017 年 4 月 3 日
Please post the complete error message. Perhaps you did not install GhostScript before?
Sudhanshu Nahata
Sudhanshu Nahata 2017 年 5 月 11 日
Hi Jay, I have a similar problem. Here is the complete error message:
"Error using ps2pdf (line 141)
Problem converting PostScript. System returned error: 1.'""' is not recognized as an internal or external command,
operable program or batch file."
Jan
Jan 2017 年 5 月 14 日
@Sudhanshu Nahata: Now please explain, which code you use for ps2pdf. This function is not contained in my Matlab 2016b.
Sudhanshu Nahata
Sudhanshu Nahata 2017 年 5 月 18 日
Sudhanshu Nahata
Sudhanshu Nahata 2017 年 5 月 18 日
@Jan Simon: If you know of any other code which can do the job, I will be happy to use that one. I tried "export_fig" https://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig , but it takes a lot of time to print pdf file and the rendering has lot of issues.

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

Walter Roberson
Walter Roberson 2017 年 5 月 18 日

0 投票

1 件のコメント

Sudhanshu Nahata
Sudhanshu Nahata 2017 年 5 月 18 日
Hi Walter, thanks for the link. I did review it. I think he issue is still unresolved even after installing ghostscript. The error that I posted is after I install ghostscript and run "ps2pdf". My guess is the way I am installing ghostscript is not correct (directory issue) or there is something that needs to be tweaked in the "ps2pdf" script. I tried few options myself but none helped. I am using 2016b.

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

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2017 年 4 月 3 日

コメント済み:

2017 年 5 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by