1

I'm trying to print to PDF a page with Firefox.

But in the resulting PDF, a portion of text is cut off near the end of the page.

This happens both with "Margin: Standard" and "Margins: None".

How can I fix it?

Here is a screenshot of what's happening:

enter image description here

1 Answer 1

1

I think I finally managed to solve it.

There was a "navigation bar" (totally white) with a larger z-index than the text, with a fixed position near the bottom of the page, that was hiding the text behind it.

I hid this navigation bar with the following CSS:

div.viewer-navigation {
    display: none !important;
    width: 0% !important;
    height: 0% !important;
    z-index: -1 !important;
    position: static !important;
}

Notice how I also applied a negative z-index (to place it behind the text, it was 2 before, placing it above the text) and restored its position to static (it was fixed before).

In order to find out how the printed page is rendered, from Firefox open the "Web Developer Tools" (Hamburger menu -> More Tools -> Web Developer Tools, or Ctrl-Shift-I), and in the "Inspector Tab", in the center pane click on the "Toggle print media simulation for the page" button (it's in the top right corner, it looks like a paper page):

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .