Closed nicohein closed 1 year ago
BWIPP just plots on the canvas. Whatever application / wrapper creates the PS template that invokes BWIPP decides where the symbol is plotted and calculates the effective bounding box for cropping purposes.
So not a BWIPP issue.
See https://github.com/adamchainz/treepoem/blob/main/src/treepoem/__init__.py#L25
The symbol should be plotted to ensure that all graphical elements fall within the first quadrant of the coordinate system due to limitation in GhostScript's bbox driver.
Thanks for the explanation and hinting at the line! Very helpful!
Hi @terryburton,
I noticed that after your commit to the EAN13.ps file https://github.com/bwipp/postscriptbarcode/commit/b4ae9e1bf1ea13c8ff1734e6d096b48222d0c429 and the changes made to the ean13.ps line 59 the first number is plotted out of bounds within the treepoem library.
Earlier today I have raised an issue with treepoem (https://github.com/adamchainz/treepoem/issues/495) and was asked to raise this issue here.
Here is an example (see the 4 at the very beginning):
Before the change:
So we can see that the initial character was shifted left, however it now results in a position negative to the coordinate roots which is not returned for the bbox device.
The command that returns the problematic bounds can be found here: https://github.com/adamchainz/treepoem/blob/main/src/treepoem/__init__.py#L89
Unfortunately, I am not familiar enough with postscript to attempt a contribution.
OS: MacOS 13.5 GS: 10.01.2
Thanks Nico