• I’ve just downloaded and started configuring the pdf template and i have a few questions
    Why does this line work
    echo '<div class="post_wrapper" ><a href="'.get_permalink().'">'.get_permalink().'</a></div>';
    and this doesn’t as a link?
    echo '<a href="'.get_permalink().'">View</a>';

    I am also trying this to display an image
    echo '<img src="https://s.w.org/style/images/wp-header-logo.png" />';
    but it doesn’t work.

    Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter drazon

    (@drazon)

    About the image I found out that it has to be on the same server and relative urls must be used example:

    src="wp-content/uploads/2015/10/filename.jpg"

    but the other one is still can’t understand it

    Plugin Contributor Shambix

    (@shambix)

    Interestingly, I have also had issues with links.
    The problem has to do with how the DOMPDF library parses the content, but it looks like a sneaky bug that hasn’t been identified yet.

    Obviously other people have had similar issues, you can read about it here and here.

    About images, you can read more here.

    Thread Starter drazon

    (@drazon)

    Thank you for your reply.

    Currently I can use nor text inside the tag neither img tags. I guess that the dompdf library which is bundled with the plugin is old and needs to be updated. This issue has been fixed in dompdf newer versions. How can I check which version is bundled within the plugin?

    Plugin Contributor Shambix

    (@shambix)

    The library is up to date (0.7.0), but if you want you can replace all the files in the dompdf folder, with https://github.com/dompdf/dompdf
    Try to do some tests with no layout and just urls, see if anything help.
    My urls weren’t working either, then I changed the pdf template and they started working, but honestly I didnt notice any particulat change in template that could justify either.

    • This reply was modified 8 years, 6 months ago by Shambix.
    Plugin Contributor Shambix

    (@shambix)

    @drazon have you had any luck or anything you would like to share about this issue?

    Thread Starter drazon

    (@drazon)

    To be honest I didn’t investigate this any further, I will though. Currently I don’t use any links but I’ll post here when I’ll do some tests.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘A few template questions’ is closed to new replies.