• ecarstens

    (@ecarstens)


    I’ve created this page and added single page PDFs by adding “inline media” and selected each PDF. The files load correctly and are visible in Safari but the PDFs do not appear when viewing with Firefox. I have not tried other browsers but would really like to know how to ensure that the PDFs load correctly in any browser.
    thanks

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Joy

    (@joyously)

    Thread Starter ecarstens

    (@ecarstens)

    We have PDF Embedder installed on our site and I suspect that allowed me to add the PDF by “inline media”. However, this does not address the error of not seeing the PDFs in Firefox, Chrome or Edge when they are visible in Safari!

    Joy

    (@joyously)

    You should ask in the plugin’s support forum then.

    Thread Starter ecarstens

    (@ecarstens)

    Okay, there are two ways to add a “PDF” to a WP page:
    – one is to use a plugin like PDF Embedder;
    – the second is to simply add inline media and select a PDF from the media library.

    I used the second method. In Safari, on the Mac or in Mac IOS on iPhones, the text from the PDF added as inline media to the page is visible and can be edited just like any image file. However, this image does not appear when viewing the page with other browsers such as Firefox, Chrome or Edge.

    Using the first method, with a plugin, the PDF appears on the WP page, but looks like a PDF window! It is visible with other browsers.

    Aesthetically, the second method produces a cleaner looking page. See the page now where I have used PDF Embedder for the first PDF under the title The Garden. Under the titles The Road to Emmaus, Thomas, The Fish, The Lamb, and Pentecost, the Pdfs were added via inline media. These latter Pdfs are only visible when viewing with Safari!
    [ redundant link removed ]

    The question remains – why do the images load correctly in Safari but not with other browsers?

    Joy

    (@joyously)

    When I looked at the source of the page before, there was nothing in between the titles. Now, the first one has nothing, the second has the working PDF embed, and the rest have <img> tags pointing to a PDF file, which is not a valid image type so the browser does not load it. Perhaps Safari is more lenient, but other browsers don’t show PDFs in img tags.
    If you didn’t use a plugin to achieve this markup, you can open a ticket about it here: https://core.trac.wordpress.org/
    Several versions back, WP added a feature to generate an image for PDF files, to show in the Media Library. It seems that there could be a mixup for wanting to choose the image for inline, versus the PDF itself.

    Thread Starter ecarstens

    (@ecarstens)

    AS you have noticed, I have been editing the page, trying to figure out how to get the PDFs as images (discussed in my previous posting). That’s why are seeing differences under the various headings.

    How can I generate an image for a PDF?

    Joy

    (@joyously)

    WordPress generates images for uploaded PDF files. See https://make.wordpress.org/core/2016/11/15/enhanced-pdf-support-4-7/
    There was a bug with that though, fixed in WP 5.6: https://core.trac.wordpress.org/ticket/48853

    The block editor handles PDF files differently than the Classic editor. See this open issue https://github.com/WordPress/gutenberg/issues/15097

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Embedded PDFs’ is closed to new replies.