golf89 Posted September 12, 2012 Share Posted September 12, 2012 (edited) I am using Ghostscript to print a PDF by command line arguments. But it shows the printed document's name as Ghostscript output in printer spooler. I want to change it to a custom name .for that i have tried a command :gswin32c -dNOPAUSE -dBATCH -c "mark /UserSettings <</DocumentName (MyDocName)>> (mswinpr2) finddevice putdeviceprops setdevice" -f -sOutputFile="%printer%Test" "-sPAPERSIZE=a4 test.pdfit is solving the problem but creating a new ie. it always give "letter" as the output page sizeso suggest me the way by which i can achieve both goalsThanks Edited September 12, 2012 by golf89 Link to comment Share on other sites More sharing options...
allen2 Posted September 12, 2012 Share Posted September 12, 2012 (edited) "-sPAPERSIZE=a4" option should work on your command line according to different ghostscript manual. Edited September 12, 2012 by allen2 Link to comment Share on other sites More sharing options...
golf89 Posted September 12, 2012 Author Share Posted September 12, 2012 that i have alredy tried out but not working Link to comment Share on other sites More sharing options...
Ponch Posted September 12, 2012 Share Posted September 12, 2012 ... there are 5 quotes ("), that is one quote too much or one too many. +there should probably be a space before -s. Link to comment Share on other sites More sharing options...
golf89 Posted September 13, 2012 Author Share Posted September 13, 2012 yeah the extra quote is a mistake and that is not even working with a space after -s. Link to comment Share on other sites More sharing options...
allen2 Posted September 13, 2012 Share Posted September 13, 2012 You could try changing the default papersize in the gs_init.ps as explained in 5.4 of the ghostscript manual. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now