Core broke the implementation for wkhtmltopdf with #1494670: References to CSS, JS, and similar files should be root-relative URLs: avoids mixed content warnings & fewer bytes to send
Dompdf has a setting for providing the base url but I can't find the same setting just yet for wkhtmltopdf. We'll either have to transform the URLs back into absolute URLs in Drupal first or find the appropriate setting.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2671134-9.patch | 2.65 KB | benjy |
| #7 | 2671134-7.patch | 2.41 KB | benjy |
| #6 | 2671134-6.patch | 2.2 KB | benjy |
| #4 | 2671134-3.patch | 2.09 KB | benjy |
| #2 | 2671134-2.patch | 2.04 KB | benjy |
Comments
Comment #2
benjy commentedHere we go, temporary workaround to fix the PHPWkhtmltopdf.
Might add some context so we only have to apply this fix for certain implementations. Also, needs tests.
Comment #4
benjy commentedTry the HTML5 parser.
Comment #6
benjy commentedAgain with the right library.
Comment #7
benjy commentedFinal patch.
Comment #8
sam152 commentedwrong variable name
Does this account for protocol agnostic URLs? what about something like:
<img src="//sitename.com/sites/default/files..." />Comment #9
benjy commentedBoth fixed.
Comment #10
benjy commentedWill commit this tomorrow.
Comment #12
benjy commentedCommitted. Hopefully one day i'll be able to remove this code!