-
Notifications
You must be signed in to change notification settings - Fork 39
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
Python Blabel generate broken PDF file #10
Comments
Thanks for posting a detailed example. Your code works fine here on Ubuntu, without running the lines with sumatra. A couple of comments on what may cause this issue: from what you wrote, |
I checked your suggestions and unfortunately the program that runs on Windows continues to generate corrupted PDF files. I installed Ubuntu in Virtualbox and ran the program on Ubuntu 20.04 LTS and in this case the program works fine and generates correct PDF files. Is there any way to fix this problem for a program that runs on Windows 10? |
This library uses weasyprint to generate the PDFs, it might be worth checking with them if they are aware of Windows issues. Another possibility is that the font used (on Windows) is causing the problem. |
I found a solution. The problem was caused by the cairo library version 1.17.4, I installed the older version of GTK3-Runtime (including cairo version 1.16.2) from 2019-11-07 from the link below and the files are generated correctly :) https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/tag/2019-11-07 |
That's great to hear, thanks for sharing |
I am writing a program to handle label printing on a thermal transfer printer. I have a problem with corrupted PDF files after generating them with blabel. For example, if I generate a label with the serial number VWAB123456, everything is fine, but in the case of the serial number VWAC123456 a corrupt PDF file is generated.
Damaged PDF after printing with Sumatra PDF looks fine, but bold font disappears and the font type changes. It looks like CSS is not being used at all at the moment. Adobe Reader error below:
Broken PDF
Damagen PDF Image
Label without bold (broken PDF file)
Label without bold
Label with bold (fine PDF)
Label with bold
Python code:
Python code
HTML code:
HTML code
CSS sheet:
CSS sheet
Can anyone help me with this problem?
The text was updated successfully, but these errors were encountered: