2

Possibly related with this

I suspect you are injecting the following CSS into the pdf iframe as a fix for the issue above:

height: 100%;
width: 100%;
border: 0px;
}

This breaks websites that embed pdfs in their pages, for example this

What Happened

Pdf gets cut

Steps to replicate the issue

Open any page with embedded pdfs , for example this

Possible Fix

The iframe should have default height set by the website.

If I'm right about the cause of the problem, maybe looking for ".pdf" in window.href before injecting the css might fix this? Disabling the css rule applied to the iframe, which only shows up when using Orion, fixes it

Version and OS

0.99.126.3-beta

Sonoma (14)

  • Vlad replied to this.
    4 days later

    orion1223

    Open any page with embedded pdfs

    You want to be specific.

      5 days later

      All the examples I've found are of pages that require login, or in my intranet at work, but this should be repreducible with any page that embeds the pdf preview as an iframe. I'll keep looking for an example in the wild, but I'll try to explain again what's happening below.

      Here's part of the HTML of the page responsible for embedding the pdf

      <div class="c-article-section__content" id="preview-content">
                                          <iframe src="/content/pdf/10.1007/BF01806105.pdf?pdf=preview" class="app-pdf-preview__frame" title="Article PDF" style="height: 100%; width: 100%; border: 0px;"></iframe>
                                      </div>

      The style="height: 100%; width: 100%; border: 0px;" only gets injected in the iframe in Orion which seems to be the source of the problem

      For comparison , here's how it's rendered in Firefox

      <div class="c-article-section__content" id="preview-content">
                                          <iframe src="/content/pdf/10.1007/BF01806105.pdf?pdf=preview" class="app-pdf-preview__frame" title="Article PDF"></iframe>
                                      </div>

      I've found this issue in the forum, which is now fixed, but if I remove the injected CSS I can reproduce it, which leads me to suspect that the fix lead to this regression.

      Anyway, I'll keep an eye out for examples in the wild so that you can see it in your end, but if you have access to Springer, accessing the link posted and scrolling to the "Article PDF" section of the page should show you a PDF iframe which is cut off , i.e. its height is very small and the contents are mostly hidden.

        No one is typing