• Resolved securityfarm

    (@securityfarm)


    Hello,
    Normally I wouldn’t post about a theme specific issue, but it is the default theme for WordPress. An embedded PDF looks fine on mobile, but the display block in a desktop browser does not resize but the PDF itself seems to, so it ends up cutting off the PDF. There is a similar thread about a fix for the Twenty Nineteen theme in how it calculates responsive dimensions

    /* FIX 2019 WIDTH CALCULATION */
    .entry .entry-content > .pdfemb-viewer {
        max-width: 100%;
    }

    but it does not work with Twenty Twenty. Is there a similar fix that you could suggest?
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @securityfarm,

    The TwentyTwenty theme appears to have a maximum content width of 580px. In the PDF Embedder main settings tab, set the maximum width for the PDF Embedder viewer to 580.

    Next, apply the following CSS to the site (you may want to adjust the 0 to increase the top and bottom margins accordingly):

    /* FIX 2020 VIEWER BUG */ 
    .pdfemb-viewer {
         max-width: 100% !important;
         margin: 0 auto !important; 
    }

    That has worked for others experiencing this issue.

    If you have any other questions, please feel free to send an email to [email protected] as we may not see messages posted here to respond in a timely fashion.

    Thread Starter securityfarm

    (@securityfarm)

    That did the trick, thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Twenty Twenty Theme’ is closed to new replies.