question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting PDF error 135 when opening with Adobe

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
liZecommented, Feb 4, 2021

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 master branch doesn’t use Cairo anymore.

0reactions
ghostcommented, Feb 8, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Help! Showing Error message 135 when trying to Save As...
First use Adobe Reader or Acrobat to identify the corrupt comments. Open that PDF in Preview App then try and delete those corrupt...
Read more >
How To Fix Adobe Reader Error 135 - Solvusoft
Acrobat Reader Error 135 Memory Leak - The error 135 causes Adobe Reader to continually leak memory. Memory consumption is directly proportion ...
Read more >
How to fix the Runtime Code 135 Acrobat Reader Error 135
Runtime Code 135 happens when Adobe Reader fails or crashes whilst it's running, hence its name. It doesn't necessarily mean that the code...
Read more >
Adobe Reader Error (135) : r/techsupport - Reddit
This error occurs because Adobe software is incredibly finicky about PDF "standards" and will sometimes choke when it opens a PDF made by...
Read more >
Adobe Reader X:&quot;The document could not be saved ...
Adobe Reader X:"The document could not be saved. There was a problem reading this document (135)". I have received a .PDF email attachment...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found