Possible to set the bleed and trim box? #59
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?
By Chris G on 2019-03-08T10:35:09.595Z
Is it possible to set the bleed and trim box values?
By josch on 2019-03-08T11:47:07.466Z
Please be more specific about what you request.
By Chris G on 2019-03-08T12:09:20.522Z
Hi Josch,
Currently we can set the pagesize e.g.
We are preparing files to go to print and need to specify the trim box and bleed box. It would be really handy to be able to pass these on the command line as well - maybe something like:
An examaple output that we'd get from one of our pfds with everything set correctly:
Thanks
Chris
By josch on 2019-03-08T12:27:17.588Z
Ah cool! Could you send me an example document implementing that?
By Chris G on 2019-03-08T13:48:00.446Z
Here you go:
I added the correct boxes using podofobox
test.pdf
By josch on 2019-03-08T14:16:37.866Z
I was not ware of the podofo tools. Thanks!
By josch on 2019-03-09T08:23:15.149Z
I'm wondering how to best implement this feature.
I don't like the idea to let the user freely specify these boxes because img2pdf is supposed to be just for the use-case of converting images to pdf and not a fully fledged pdf editor. If one wants to set the boxes precisely, then there is podofobox.
So I'm thinking about implementing this feature in the same way as the
--border
option was implemented. So instead of giving all four corners, one just gives the relative horizontal and vertical distance between the MediaBox. This would then also play nice with images of different sizes where each pdf page would have a different size.Would that satisfy your use-case or do you need precise control of each coordinate of the boxes? If yes, why?
By Chris G on 2019-03-09T09:15:58.389Z
That would definitely satisfy my use case and would be ideal.
I'm sure there will be people out there who do need to control each coordinate, but I can't think of any obvious reason to do that and as you say if that's what you want then using podofobox is probably the right solution.
By josch on 2019-03-28T09:29:08.074Z
Mentioned in issue #61
By josch on 2019-04-02T05:40:20.245Z
Hi, could you test the version from git? Commit
ed6187d5
should implement the feature you need. Try using the new --crop-border, --bleed-border, --trim-border and --art-border options.By josch on 2020-04-05T13:18:41.904Z
This should be fixed in version 0.3.4
By josch on 2020-04-05T13:18:41.989Z
Status changed to closed