Module

Archived
Forum
(read-only)

PDF Press

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5, ExpressionEngine 6

Back to this add-on's main page
View Other Add-ons From Doug Black, Jr.

     

PDF Press: There was an error in the DOMPDF Library (HELP)

Support Request

Sears Davies
Sears Davies

Dear,

I was wondering if you could help me as suddenly all my websites are showing the error when I generate the PDF:

The following errors were encountered
PDF Press: There was an error in the DOMPDF Library, usually this means your HTML/CSS is not compliant in some way, please check your HTML/CSS markup using the W3C Validator (http://validator.w3.org).
Error Message: No block-level parent found. Not good.


It was working fine till yesterday and now its not working, also each website is hosted on a different server and its very strange to have the same issue with all of them !!!

Sears Davies
# 1
Sears Davies

All websites are running EE 4 and PDF Press 4 //
Also are running on PHP 5.6 / PHP 7.1 / PHP 7.2 on different VPS(s)

Sears Davies
# 2
Sears Davies

Hi Again,

Finally i found a solution but its VERY strange!

My template’s header looks like this:
{exp:pdf_press:parse_pdf attachment=“0” size=“a4” orientation=“portrait”}
<!DOCTYPE html>
<html lang=“en”>
<head>
  <meta http-equiv=“Content-Type” content=“text/html; charset=utf-8”/>
  <title>PDF</title>
  <link rel=“stylesheet” href=”{site_url}/css/pdf-news.css” media=“pdf”/>
</head>


If I remove both <head> and </head> tags then everything works perfectly !?

Any ideas please ?

Thanks

patpohler
# 3
Developer
patpohler

That’s bizarre, had anything changed in your templates or VPS setup?

Is the HTML5 Parser enabled in the PDF Press settings?
https://www.dropbox.com/s/9m9hbe20otr012g/Screenshot 2018-01-19 09.28.14.png?dl=0

Sears Davies
# 4
Sears Davies

Thanks,

The HTML5 Parser is enabled but as soon as put <head> tag it will thought the error message!
I have removed it for the time being and will investigate further.

Thanks

patpohler
# 5
Developer
patpohler

I’ll look into it more on my end. There’s a github issue that seems related to this in DOMPDF. https://github.com/barryvdh/laravel-dompdf/pull/384 I’m wondering if the html5parser isn’t getting set properly in the dompdf library. I’ll try to reproduce the issue

Sears Davies
# 6
Sears Davies

Thanks very much, It seems its exactly the same issue I have.