How do I change the paper size when I print to a PDF file in MATLAB 6.5 (R13)?
I am using MATLAB 6.5 (R13) on a UNIX operating system (Sun Solaris).
I have also been able to reproduce the same error on a Windows 2000 operating system.
I want to define a custom paper size when I print a figure to a PDF file. I use the following commands to change the paper size and Print to a PDF file.
plot(1:100)set(gcf,'papersize',[6 8])print -dpdf adobetest.pdf
When I run the code I get the following error.
ERROR: ??? Error using ==> print Error using ==> d:/applications/matlab6p5/toolbox/matlab/graphics/private/ghostscript Problem calling GhostScript. System returned error: Unknown paper size: (<custom>). Unrecoverable error: stackunderflow in dup Unexpected interpreter error -17. Error object: (d84)name(0x98b088#388)dup Execution stack at 0x61cdc0: 0xa9d738: 0x0f oper –F—e– 0x0000 0x00462795 = %interp_exit 0xa9d740: 0x03 file –G-rxe– 0x0001 0x00a93d40 0xa9d748: 0x05 mpry –G-rxe– 0x0039 0x00ae6dc2 Dictionary stack at 0x61ce80: 0xa9df68: 0x02 dict –Gwrx— 0x0000 0x00a90088 0xa9df70: 0x02 dict –Gwrx— 0x0000 0x00af5540 0xa9df78: 0x02 dict –Lwrx— 0x005e 0x00a97f80 0xa9df80: 0x02 dict –Gwrx— 0x0000 0x00a90088 gsdll_init returns -17 DLL already in use Error in ==> S:\985588\user_code.m On line 12 ==> print -dpdf adobetest1.pdf
Best Answer