-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't display image in pdf-template? #32
Comments
Hi @dansarn ! If you want to include to the template the thumbnail of a post for example instead of just including it like usual you should do something like:
|
Thanks for the reply @Julianoe! Still can't get it to work though. :( |
(oops accidentally, closed the issue....)
This code above lets me display the PDF, but with a "Image not found or type unknown"-error. If i instead use "$the_thumbnail_link_url" as the img src i cant even get the PDF to open. |
I don't have the time this evening but i'll try it on my end soon and i'll let you know what can be done maybe. Stay tuned |
Oh, sweet @Julianoe! Thanks! I'm all ears! :D |
Any success yet, @Julianoe ? :) |
I use get_the_post_thumbnail_url() inside the loop and it works for me. Note that the generated PDF links to the image - it does not embed it. This means you must have a live internet connection that can reach the source images for it to work. If you want to embed an image, you can by base64 encoding it. I use the following code:
I use this function in the PDF template:
You can see this in action at: |
No matter how i try i can't get a image to show in the PDF.
Or rather: When i try to include an image my PDF fails to open.
There is a error message saying "Fel, Det gick inte att läsa in PDF-dokumentet.", meaning "Error, unable to open the PDF document.".
Is there still any support for this plugin, cuz i don't think i will be able to solve it by my own. :(
The text was updated successfully, but these errors were encountered: