Skip to content
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

DrawPdf not honouring width and height input #250

Open
Joshmul1 opened this issue Jun 11, 2024 · 1 comment · May be fixed by #251
Open

DrawPdf not honouring width and height input #250

Joshmul1 opened this issue Jun 11, 2024 · 1 comment · May be fixed by #251

Comments

@Joshmul1
Copy link

When using the Viewer package the default 4x6 label size is not honoured when the PDF is created, instead it seems to be a constant 11.11 x 13.33 inches (281.94 x 338.58 mm) when inspected using adobe.

This can be replicated using the online viewer at https://binarykits-zpl-viewer.azurewebsites.net,
Using https://labelary.com/ with the same ZPL and settings does honour the size requirement.

Any help into figuring out why its behaving this way would be great, I am going to try debug and fix it myself but I am unfamiliar with this code base.

Thanks

@Joshmul1
Copy link
Author

Joshmul1 commented Jun 11, 2024

Okay I have an update, I think I found the issue and will create a PR for it just now.

The BeginPage method requires the passed value to be inches * 72, where 72 is the PdfDpi. This value is currently being passed in millimetres.
The PDF is also not being scaled correctly, but as far as I can tell this is now all fixed with my change.

@Joshmul1 Joshmul1 linked a pull request Jun 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant