Project

General

Profile

Actions

Bug #22809

open

Pdf embed not working

Added by Laurie Hurson 8 days ago. Updated 8 days ago.

Status:
Reporter Feedback
Priority name:
Normal
Assignee:
-
Category name:
-
Target version:
-
Start date:
2025-05-22
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hi All,

I am trying to embed a pdf here: https://vp.commons.gc.cuny.edu/2025/05/20/do-not-ask-me-to-remain-the-same/

this is the pdf: https://s3.amazonaws.com/files.commons.gc.cuny.edu/wp-content/blogs.dir/2881/files/2025/05/Do-not-ask-me-INTRO-for-visible-pedagogy-.pdf

I have tried embedding with file block, google drive (pdf in drive) and embedpress

File block works but is not visible on mobile (view on desktop switched to mobile works but not actually on a phone). Because of the mobile issue I tried Google block and embed press and those do not work.

Any ideas or guidance? Thanks!

Actions #1

Updated by Boone Gorges 8 days ago

  • Status changed from New to Reporter Feedback

EmbedPress uses the PDF.js library for PDFs, and PDF.js has a hardcoded check that disallows any PDFs that are not hosted on the very same domain as the embedding site. So you can't embed s3.amazonaws.com on vp.commons.gc.cuny.edu. You wouldn't even be able to embed something from files.commons.gc.cuny.edu or commons.gc.cuny.edu. There's no way around this, aside from major patches to PDF.js or weird proxy workarounds.

I tested the PDF Embedder block and it appears to work: https://vp.commons.gc.cuny.edu/2025/05/20/do-not-ask-me-to-remain-the-same/ I think my recommendation will be use this plugin, if that works for you.

Actions #2

Updated by Laurie Hurson 8 days ago

Thanks Boone. I don't know why I did not consider PDF Embedder as an option. Sorry about that! And thanks again, it looks good!

Actions

Also available in: Atom PDF