Support #13201

PDF embedder

Added by Marilyn Weber almost 2 years ago. Updated over 1 year ago.

Priority name:
Category name:
Target version:
Start date:
Due date:
% Done:


Estimated time:


Apologies if we discussed this before. Is it impossible to use the PDF embedder plugin in the block editor? Someone on Zendesk couldn't find it there but sees it easily in classic. That person't problem is solved, so there's no rush on this "problem" (which may be a Marilyn error and not a problem at all).


#1 Updated by Boone Gorges almost 2 years ago

What PDF embedding solution did we offer in the past? Scott, do you have info about this?

#3 Updated by scott voth almost 2 years ago

I notice that if I have hypothesis installed, I get a network error using the block editor.

"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)."

When I uninstall hypothesis it works in the block editor.

When I use the classic editor I also get a network error. Seems that hypothesis url is getting appended to the front of the PDF url.

But in general, I think PDF embedder works fine with block editor. And as Ray suggests, there is another plugin that does the same thing.

#4 Updated by Boone Gorges almost 2 years ago

  • Status changed from New to Reporter Feedback

Scott, could you provide more details on how you're inserting the URL? You say that is prepending the URL, but how are you getting the URL there in the first place?

In the case of the specific URL you're testing with, it appears that this file is not publicly accessible (because the site is not publicly accessible). As such, Hypothesis will not be able to embed it: not because of the CORS headers, but because of WP permissions. See See also #11276, where we seem to have experienced a similar mismatch between a particular PDF embedding plugin "PDF Embedder" and Hypothesis.

#5 Updated by scott voth almost 2 years ago

Hi Boone - I went to the media library to get the PDF's URL. In the Classic editor, I just pasted in the url on a new line and PDF Embeddeer created a short code ([pdf-embedder url=""]). In the block editor, I just clicked the plus sign to add a block, picked PDF Embedder block, and pasted the url into the text field.

Also, I temporarily made my test site public, and still got the network error in both the classic and block pages.

#6 Updated by Boone Gorges almost 2 years ago

Thanks, Scott. It took me a while to wrap my head around this. (Again. It's mostly the same issue as #11276.) I've made some adjustments to ensure that Hypothesis doesn't wrap its 'via' prefix around pdf-embedder links. I've deployed this to production, where I needed to test the HTTPS issues. Can you have another look?

For the record, I'm still not 100% sure that this is the exact problem being raised by Marilyn in the original post. Marilyn, maybe you have some more context?

#7 Updated by scott voth almost 2 years ago

Hi Boone - Your change seems to have done the trick! It is now working with hypothesis installed.

I agree that the issue that Marilyn reported was probably not related to this. I think her issue was the member did not find the PDF Embedder block for some reason. But it is good to have this conflict resolved. :)

#8 Updated by Boone Gorges almost 2 years ago

Thanks for confirming, Scott!

#9 Updated by Boone Gorges over 1 year ago

Marilyn, any more word on this?

#10 Updated by Marilyn Weber over 1 year ago

None, you can close it

#11 Updated by Boone Gorges over 1 year ago

  • Status changed from Reporter Feedback to Rejected


Also available in: Atom PDF