The module works with Dompdf 0.8.5 but if you try to update to Dompdf 0.8.6 you receive errors like:

Error generating document: Failed to generate PDF: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known

If you have similar issues downgrade Dompdf to 0.8.5:
$ composer require 'dompdf/dompdf: 0.8.5'

CommentFileSizeAuthor
#18 3169624-18.patch1.99 KBuditrawat
#16 3169624-16.patch901 bytessheanhoxie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oriol_e9g created an issue. See original summary.

oriol_e9g’s picture

Issue summary: View changes
oriol_e9g’s picture

Issue summary: View changes
oriol_e9g’s picture

Issue summary: View changes
r81d3r’s picture

downgrading to 'dompdf/dompdf: 0.8.5' worked for me. thanks!

waiting for this problem to be fixed

oriol_e9g’s picture

Issue summary: View changes
Toki’s picture

The same here, downgrading DomPDF to 0.8.5 worked for me.

oriol_e9g’s picture

Issue summary: View changes
flocondetoile’s picture

Same here. downgrading DomPDF to 0.8.5 fix the issue.

Full error message

Drupal\entity_print\PrintEngineException : Failed to generate PDF: file_get_contents(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known, ... Image not found http://URLnone in Drupal\entity_print\Plugin\EntityPrint\PrintEngine\DomPdf->send() (line 192 of /private/var/www/PROJECT/web/modules/contrib/entity_print/src/Plugin/EntityPrint/PrintEngine/DomPdf.php).

Tsymi’s picture

Thanks it worked for me too with 0.8.5.

chiefme’s picture

Yes. Downgrading to Dompdf 0.8.5 worked.

luke.stewart’s picture

This has been mentioned upstream -> https://github.com/dompdf/dompdf/issues/2244 and there is a "patch" you can apply to vendor/dompdf/dompdf/src/Css/Style.php to get around this without requiring a downgrade to 0.8.5 until this is either resolved in dompdf or this module.

ytsurk’s picture

The patch works. I really hope dompdf will support the non-standard CSS value url(none) for the background-image property.

I made an alternative patch, see https://github.com/dompdf/dompdf/pull/2270/commits/085a3b86a4768609ac230...

socketwench’s picture

I ran into this problem myself. DOMPDF seemed append "none" to any image URL so you'd get like "example.comnone" for some reason...

Downgrading worked for me.

ytsurk’s picture

This will be fixed with the next dompdf release.

sheanhoxie’s picture

FileSize
901 bytes

The patch in #13 wasn't working for me. I also needed to adjust the method set_background_image()

ytsurk’s picture

Status: Active » Closed (won't fix)

You also need to watch the list-styles ;)

The latest patch from issue 2244 made it into dompdf and will be released: https://github.com/dompdf/dompdf/commit/2ee96e2885f801e120adcba36224496f...

uditrawat’s picture

FileSize
1.99 KB

Added similar code for list_style_image also.
It seems to be working now.

superlolo95’s picture

downgrade worked for me

mErilainen’s picture

So it doesn't seem to work with dompdf 0.8.6. Should the module be updated to require dompdf 1.0.0 or greater?

Umac_de’s picture

downgrade worked for me too

joekers’s picture

Downgrading didn't work for me but using patch #18 worked and seems to have fixed the errors. Thanks!

Edit: It was the "Enable Default CSS" option which 'fixed' it - this allow the PDF to be generated.