RFE: empty page #196
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sometimes it is desirable to have an empty page inserted into a PDF at certain points, e.g. when the PDF is to be printed two-sided.
Right now, the easiest way to do that in img2pdf seems to be able to insert a very small image (e.g. a 1x1 PNG with a single white pixel), but that is kind of unnecessary. It would seem logical that an empty input file (e.g. /dev/null or NUL:) could insert a completely blank page with no image object at all.
I'm not a fan but lets try to spin this thought further. Maybe you manage to convince me. How would this work in practice? Lets say the user runs this:
What size would the empty page have?
In my use case, I'm setting --pagesize explicitly, so it is not an issue. However, without a (minimum) page size I agree this could be confusing.
I slept of this and thought a bit more. I think what made me not like this feature is, that I think it should be other tools which are made for PDF manipulation like pdftk who should be responsible for creating empty pages in the right places. But then I learned that pdftk doesn't know how to create an empty page.
So maybe you are right and img2pdf should support this but throw an error if pagesize is not give explicitly.
I'd be open to reviewing patches that implement this.