-
-
Notifications
You must be signed in to change notification settings - Fork 65
Resizing Symbols
Terry Burton edited this page Sep 28, 2022
·
8 revisions
To create a barcode of some required width and height (without stretching the text) perform the following steps, in order.
Starting with this example:
0 0 moveto (9520123456788) (includetext)
/ean13 /uk.co.terryburton.bwipp findresource exec
Find the uniform (same x and y) scale factor that makes your output of the required width:
gsave
2 2 scale % <-- Add a line like this
0 0 moveto (9520123456788) (includetext)
/ean13 /uk.co.terryburton.bwipp findresource exec
grestore
Add a height option that adjusts the bar height appropriately (taking the scaling into account):
gsave
2 2 scale
% Added height=0.8 option to adjust height
0 0 moveto (9520123456788) (includetext height=0.8)
/ean13 /uk.co.terryburton.bwipp findresource exec
grestore
The result should now be of the intended dimensions with properly scaled (not stretched) text.
Home | Download | Documentation (PDF) | Source | Support | Issues | Online Barcode Generator