Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-13-2014, 11:29 AM
|
#1
|
Member
Registered: Jan 2011
Location: Netherlands (Zuid Holland)
Distribution: Debian 8
Posts: 31
Rep:
|
GhostScript resize paper size
I have pdf documents with a page size of 18 x 23 cm.
I want to have this resized to a4. I want the pages to be centred, but NOT scaled, so that I have larger margins to make annotations.
I have tried:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dFIXEDMEDIA -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -sOutputFile=$of $if
But it doesn't work.
I have also tried:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dFIXEDMEDIA -dPDFFitPage -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -sOutputFile=$of $if
This resizes the pages to 210x270 (which is not a4), and it scales the pages, which I don't want.
Anybody any idea how I can make it do what I want?
|
|
|
03-13-2014, 02:38 PM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,280
|
I would go for Adobe's reader, as the printing options there are gui and very complete. You can very margins. Also tune this to work on one specific printer, as differ5ent pinters may give different results
|
|
|
03-14-2014, 12:31 AM
|
#3
|
Member
Registered: Jan 2011
Location: Netherlands (Zuid Holland)
Distribution: Debian 8
Posts: 31
Original Poster
Rep:
|
I am using a GUI at the moment, but I want to use scripting because it's fast and easy.
At the moment I use PDF writer under windows to do the job, because it keeps the file size small. In Linux you can print to file, but then the file size usually becomes more then 3 times as big.
GS seems a great tool, and it works if you use scaling. I think it must be possible to get what I want, I just don't know how.
I have tried your suggestion by using Adobe Reader 9 on Linux (Ubuntu 10), but then I cannot print to file, only to paper. I want to have it on file, because I use Xournal to annotate the pdf's.
|
|
|
03-14-2014, 01:14 PM
|
#4
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,280
|
OK, then, I'd add margins. There must be a way
/ types furiously on console.. . . .
Look at gs_statd.ps, which I find in
/usr/share/ghostscript/9.05/Resource/Init
There's an 'a4small' paper size defined, i.e. a4 paper with a smaller image box. A little hacking on the image box should set you right. There's also 'lettersmall' and 'note'
Try them out.
|
|
|
All times are GMT -5. The time now is 10:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|