Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am training to merge multiple files using ghostscript, nevertheless the problem arises because the pdf files are in different paper size.

So far, I've found this one command:

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf file1.pdf file2.pdf file3.pdf [...] lastfile.pdf

With same paper size it works, otherwise it does not.

Any suggestion are welcome?

Thanks for reading :)

share|improve this question
add comment

1 Answer

Do you want all pages in the resulting document to have the same paper size? For that, you would need to resize the page of one of the two documents. This question deals with resizing one PDF using ghostscript.

Otherwise, just leave out the -sPAPERSIZE switch, so your command will look like:

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf file1.pdf file2.pdf file3.pdf lastfile.pdf
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.