I’ve been using the standard PDF embedding syntax without problems [foo](/docs/bar.pdf), but this no longer works properly with the lastest Chrome update. When a user clicks on the link it is rendered in a tiny window, and there is an option to pull it into Chrome reader mode. Chrome no longer renders in the entire Browswer window. The problem does not occur with Firefox, so it is a Chrome problem. Any tips would be appreciated. Otherwise, this is a heads up!
The platform is Ubuntu Linux.
Thanks!
After some poking around it seems there is a Hugo SPA layer betwen the PDF and the browser, and it results in the PDF being displayed in a tiny viewport. Using Ctrl + increases the size of the text, but not the size of the viewport (a peephole). I can open PDF files from other websites without problems, and I can navigate to a PDF file using file:// and display without problems. This is probably a Chrome/Ubuntu bug, but I wonder if this SPA theory is correct?
That’s just a Markdown link. It is not “standard PDF embedding syntax”.
Perhaps your theme uses a Markdown render hook to transform a link to a PDF file into something else. If so, please contact the theme author.
Static Site Generators make static sites, the very opposite of SPAs.
file:/home/drm/Booking_We_couldnt_get_you_any_refund.pdfworks because /home/drm/Booking_We_couldnt_get_you_any_refund.pdfis an absolute path on your disk.
Your URL should be a path relative either to the current page, or either public or htdocs, whichever folder is your project’s root…