metaist / pdfmerge

Command-line utility for merging, splicing, and rotating PDF documents.
http://metaist.github.io/pdfmerge/
Other
121 stars 24 forks source link

Implement alignment #18

Closed thisirs closed 1 year ago

thisirs commented 7 years ago

Adding blank pages if needed at the end

Not fully tested but does that sound good to you?

metaist commented 7 years ago

Can you explain a little bit about the use case for blank pages?

thisirs commented 7 years ago

For example, if you want to merge several documents and print them, a (eventual) blank page makes sure that a given sheet contains only one document and is not mixing two of them...

no1xsyzy commented 6 years ago

Then why not add a separate blank page between them? And most documents should have headers and footers, which can prevent mixing.

thisirs commented 6 years ago

@no1xsyzy A blank page is not always necessary nor desirable. I just don't want a document to start on an even page which might happen if the previous document ends on an odd page. This patch makes sure that a new document starts on an odd page inserting or not a blank page.

no1xsyzy commented 6 years ago

Then this description makes more sense. You should've described more about "if needed". However, there might be some mistake in your edits. I will comment on your code in file changes.