Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Jaso

    (@subwebsites)

    This happens in FREE and PRO versions

    Hi @subwebsites,

    It’s probably the BAN USERS Default Ban List rewrite condition that checks for an empty user agent that is causing this:

    RewriteCond %{HTTP_USER_AGENT} "^$" [NC,OR]

    To make sure, you can temporarily turn that line into a comment in the .htaccess file (assuming your web server is Apache).

    # RewriteCond %{HTTP_USER_AGENT} "^$" [NC,OR]

    If the images then miraculously start showing in the PDF we’ve got our confirmation. Since the iTSec plugin rewrites the entire .htaccess every hour there is no need to undo the change.

    +++ To prevent any confusion, I’m not iThemes +++

    • This reply was modified 1 year, 6 months ago by nlpro.

    Hi @subwebsites,

    What version of DOMPDF are you using ?

    It seems this issue should be fixed in v2.0.0 or higher. With previous versions you can?set a custom context?that includes a user-agent string.

    $context = stream_context_create([
        "http" => [
            "user_agent" => "my-user-agent-string"
        ]
    ]);
    $dompdf->setHttpContext($context);
    Thread Starter Jaso

    (@subwebsites)

    Hi, this is the problem: https://prnt.sc/q8JVd-Lx4tZ3 works when hashed out, hows this going to get fixed?

    I havent a clue what version of DOM using

    Thank

    Hi @subwebsites,

    Ok, nice. Check the content of the dompdf/VERSION file to get the version.

    Thread Starter Jaso

    (@subwebsites)

    DOMPDF version 1.0.2

    Ah, voila. So updating DOMPDF to the latest version (2.0.3) should resolve this issue.

    Alternatively, if you don’t want to update (for whatever reason), you can set a custom context?that includes a user-agent string (as mentioned in one of my previous posts).

    • This reply was modified 1 year, 6 months ago by nlpro.
    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @subwebsites, I hope the information provided by @nlpro helped resolve your issues. Due to inactivity, I’ll mark this post resolved. If you still need some assistance, feel free to open a new support topic, and we’d be happy to assist. Thank you!

    We appreciate your help, @nlpro!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Breaking images on PDF’ is closed to new replies.