From the Knowledgebase

How to Center the PDF

The default settings of the plugin will display your PDF at 'maximum width' to fit the area available to it.

If you specify a fixed width for your PDFs that is smaller than the width available, you will probably find the PDF is left-justified within the main area of your web page.

If you want to center the PDF, this depends on your theme's CSS styles, so you might need to ask your web designer to take a closer look, but one way or another you'd need to target the following CSS element in your theme's style.css file:

<code>div.pdfemb-viewer {
    margin: 0px auto !important;
}</code>Code language: HTML, XML (xml)

It is unlikely the above suggestion would work directly - again, it depends on the rest of your CSS and layout, but hopefully, this clarifies what your web designer needs to target in the CSS.

You can also add bespoke CSS through Appearance -> Customize -> Additional CSS if you are using a classic theme.

If you use the new themes that support Block Editor, you can wrap the block with a shortcode of a PDF Embedder block into a Group block, and configure it to center all the content inside of it.

Top