PDF Export Custom Styles Issue

Hello,

I am trying to edit the PDF export option in Custom Styles, however, none of the CSS applies when I export. Another issue I’m facing, which might be related, is that the images overflow outside the page and re-adjusting the dimensions or adding CSS does not work.

May you please help me with this?

Thank you.

Hi there!

Without being able to look at the book in question it is difficult to precisely identify the issue. I would suggest starting here:

  • make sure you are adding your Custom CSS in the “PDF” panel (and not the “Web” panel
  • CSS can be a bit finicky, so make sure your CSS targets the right element; using PDF preview and the browser’s inspect tool can help here
  • images can overflow outside the page when a custom size is chosen for the image. Make sure to use one of the preset sizes for your images.
2 Likes

Hi Mich!

Thank you for your response. I’ve tried implementing my Custom CSS in the ‘PDF’ panel, but none of the styles are applying. However, the image issue seems to be solved by adjusting the width and height in the HTML. Are the selectors in the ‘PDF’ panel the same as the ones in the ‘Web’ panel? Thank you!

The selectors are not always the same and sometimes targeting them requires an !important statement to work. You can find out the correct selectors by using the PDF Preview button on the Export page. This opens up a page with the PDF preview that you can inspect like you do any webpage.