Consider this PDF. I am trying to convert it to standard letter size (8.5 x 11) using the following command.
gs -dFIXEDMEDIA -dBATCH -dNOPAUSE -sPAPERSIZE=letter \
-dPDFFitPage -q -sDEVICE=pdfwrite -sOutputFile=out.pdf \
dean08mapreduce.pdf
Here is pdfinfo
on the output.
Producer: GPL Ghostscript 9.10
CreationDate: Mon Nov 17 18:25:01 2014
ModDate: Mon Nov 17 18:25:01 2014
Tagged: no
Form: none
Pages: 7
Encrypted: no
Page size: 596.225 x 792 pts
Page rot: 0
File size: 126908 bytes
Optimized: no
PDF version: 1.4
Here is pdfinfo
on the original:
Producer: Creo Normalizer JTP
CreationDate: Fri Dec 21 09:09:07 2007
ModDate: Fri Dec 21 14:46:23 2007
Tagged: no
Form: AcroForm
Pages: 7
Encrypted: no
Page size: 603 x 801 pts
Page rot: 0
File size: 235239 bytes
Optimized: yes
PDF version: 1.3
Notice that the output has the correct height but not the correct width. It is effectively 8.3 x 11
, not 8.5 x 11
.
I have tried the solutions here and here but neither achieves what I require.
How can I force the PDF to be exactly 8.5 x 11
?
I do not mind if it involves adding a little whitespace on either side.