-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PDF scaling #251
base: develop
Are you sure you want to change the base?
Fix PDF scaling #251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is converting to the nearest inch actually the correct behavior? Many label sizes are not exact multiples of an inch (e.g. 4" x 6.5").
Good point, I'm not sure why I went down the rabbit hole of using an int specifically. |
The scaling doesn't appear to be correct in all cases. Examples 5, 6, and 8 in the WebViewer are all cropped - this is not the case with the current release. |
It works for lots of different sizes but then some render with whitespace on the right as the canvas we're drawing on is too small. Do you have any initial ideas on what could be causing it to be strange on some sizes? |
I've misunderstood the issue you reported earlier. When I use the web api, labeleray and my branch I get the same results on them all. Can you please give me more info on the issue you're seeing so I can try replicate it? |
Done some more playing around with that particular example and I'm struggling to know what I'm needing to do to debug or fix the issue. I might need some help on this one. The fix I made does work for a large amount of labels so I can use it for my purposes without issue until someone else can give insight or a solution on the issue. |
From what it seems, not all elements are being scaled equally. From the example 5, the graphics boxes appear to be scales, but the text and barcodes are not. |
I believe all the elements should scale after merging my most recent PR. I observed the same issue when trying to scale a canvas passed into the ZplElementDrawer. It is because text and barcodes element drawer clear any scaling applied with the following code.
|
Fixes #250