You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh, now you are getting beyond my area of expertise. I'm not a web developer. The machine is still the same. It's possible (likely?) that the theme I am using (minimal mistakes) was updated and that made a change.
I can confirm the same issue (view link is there but no PDF is shown, it downloads it instead of showing) using Mozilla/Firefox (latest version, on Mac) even with your website (photo below). It works perfectly fine when I open it in Google Chrome though.
@MihajloNesic Thank you for letting me know.
If this helps, I should add that for my own jekyll based blog I was doing my test while running the server locally and I had not yet pushed to GitHub pages (I see from your screenshot that you have already pushed to server). But for the case of your website (the screenshots in my previous comment), these were indeed strange behavior.
Hey @MihajloNesic, @jlconlin
I have the same issue when I use an external pdf link from Github!
everything works fine when I test the plugin with your example link as below: {% pdf "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" %}
But when I use an external link (from Github), the browser suddenly starts downloading the PDF file.
I ran my Jekyll website locally, and I tested the output on Google Chrome and Microsoft Edge, both of them started to download the PDF file.
here is my code: {% pdf {{ site.data.cv.dlink }} %}
Activity
MihajloNesic commentedon Oct 20, 2021
That's strange. You are using the correct syntax. Is there anywhere I can see this live?
Until then, you can check out the official example usage page -> https://mihajlonesic.gitlab.io/jpe-examples/
jlconlin commentedon Oct 21, 2021
@MihajloNesic Unfortunately, the page is not hosted externally. I have seen the example page, which helped.
Attached to this is my (edited)
_config.yml. I just removed the personal things that I can't share. It "shouldn't" affect the issues I'm seeing._cfg.yml.txt
I know this plugin used to work. But now it seems that every post I have that embeds the PDF, now just downloads it instead.
MihajloNesic commentedon Oct 21, 2021
@jlconlin Hmm, the config file didn't really help (thank you though). You probably did set it up correctly, as you said, it did use to work.
Does that mean that the server from which you are embedding the pdf files has changed? Maybe the Content-Disposition header changed?
I will try to recreate the issue (probably) this weekend. Thank you for your time and keep an eye on this issue :)
jlconlin commentedon Oct 22, 2021
Oh, now you are getting beyond my area of expertise. I'm not a web developer. The machine is still the same. It's possible (likely?) that the theme I am using (minimal mistakes) was updated and that made a change.
MihajloNesic commentedon Oct 23, 2021
Hello @jlconlin .
I've made an example Jekyll website with theme Minimal mistakes and jekyll-pdf-embed. You can view the source code here https://github.com/MihajloNesic/minimal-mistakes-pdf-example or see the demo live here https://mihajlonesic.github.io/minimal-mistakes-pdf-example/jekyll-pdf-embed-test
The plugin works as expected. No automatic downloads
akbaritabar commentedon Dec 24, 2021
I can confirm the same issue (view link is there but no PDF is shown, it downloads it instead of showing) using Mozilla/Firefox (latest version, on Mac) even with your website (photo below). It works perfectly fine when I open it in Google Chrome though.
In Mozilla/Firefox
In Chrome
MihajloNesic commentedon Dec 31, 2021
Hi @akbaritabar, thank you for the screenshots.
That is a strange behaviour. I just tested on Firefox and Chrome (both latest versions) on MacOS and it works perfectly.
Firefox

Chrome

I think dumping the iframe is a priority for the next update.
akbaritabar commentedon Dec 31, 2021
@MihajloNesic Thank you for letting me know.
If this helps, I should add that for my own jekyll based blog I was doing my test while running the server locally and I had not yet pushed to GitHub pages (I see from your screenshot that you have already pushed to server). But for the case of your website (the screenshots in my previous comment), these were indeed strange behavior.
jlconlin commentedon May 17, 2022
Any word on how to fix this? I can confirm that this is an issue using Firefox on my Mac, but it works using Chrome on my Mac.
hosseinabdinf commentedon Jul 15, 2022
Hey @MihajloNesic, @jlconlin
I have the same issue when I use an external pdf link from Github!
everything works fine when I test the plugin with your example link as below:
{% pdf "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" %}But when I use an external link (from Github), the browser suddenly starts downloading the PDF file.
I ran my Jekyll website locally, and I tested the output on Google Chrome and Microsoft Edge, both of them started to download the PDF file.
here is my code:
{% pdf {{ site.data.cv.dlink }} %}site.data.cv.dlink is:
https://raw.githubusercontent.com/hosseinabdinf/curriculum-vitae/main/hosseinabdi.pdf
also, I tested it with the embed tag:
<embed src="{{ site.data.cv.dlink }}" width="500" height="375">the problem still remains and the result is the same!
But when I use local PDF file, it works fine and the PDF shows correctly:
local: /assets/hosseinabdi.pdf{% pdf {{ site.data.cv.local }} %}I think the type of link we use is the cause of this problem, so if we use a direct link there will be no problem anymore.