-
-
Notifications
You must be signed in to change notification settings - Fork 711
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
Getting PDF error 135 when opening with Adobe #1292
Comments
Hello! Do you use the latest stable version of WeasyPrint (v52.2) or the current |
Hi there, thanks for asking. It was 52.2 and I tried forcing older versions as well to see if it made any difference with no luck. Depending on how hard it is to figure out I'm looking at just sending the data to Power BI as I have an environment there already for reports. |
Oh, that’s strange. We’ve seen such errors with the |
I'm experiencing a similar issue and have narrowed it down to a Edit: When I uncompress with qpdf I get the following warnings. No such issue when I remove the /.
|
Thanks a lot for this comment. Could you please share the PDF file, so that I can try to find the reason of the problem too 😄? |
Thanks @liZe! I will email the input html as well as the output pdf to you right away. |
This bug is caused by a bug in Cairo 1.17.4: https://gitlab.freedesktop.org/cairo/cairo/-/issues/449 Cairo 1.17.4 is not a stable versions and suffers from many bugs. Using the latest version of Cairo instead (1.16.0) fixes this problem. Also note that the current |
Confirmed, downgrading to Cairo 1.17.2 solved this issue. Thanks @liZe! |
Having the same issue, the full error is "There was an error processing a page. There was a problem reading this document (135).". Additional information reads "Dictionary keys must be direct name objects.". A more minimal HTML producing this issue follows: <!DOCTYPE html>
<html>
<head>
</head>
<body>
<table>
<tr>
<td>Hi</td>
</tr>
</table>
</body>
</html> I haven't tried downgrading Cairo yet, but I thought I would provide more information about the error along with a minimal test case. |
Have the simplest python script possible using the WeasyPrint tutorial. I'm using the latest versions of all libraries involved as I just set up everything for the first time.
Python code is:
from weasyprint import HTML, CSS HTML('http://weasyprint.org/').write_pdf('weasyprint-website.pdf')
When opening the pdf with adobe it tells me it wasn't all readable and detected a problem, error 135. I can view the pdf in any web browser. So if I print to pdf from the web browser and reopen then it works, just can't open direct after WeasyPrint creates the pdf from python. Any suggestions on how to troubleshoot this?
I'm integrating all this into an automation app that emails out reports to executives so the manual print to pdf work around for testing won't work for me in production.
The text was updated successfully, but these errors were encountered: