zhaoterryy / mkdocs-pdf-export-plugin

An MkDocs plugin to export content pages as PDF files
MIT License
313 stars 44 forks source link

first page is blank #87

Closed t-f-x closed 4 years ago

t-f-x commented 4 years ago

hello, I am using your plugin with the theme material and the first page is blank (only footer are printed). I have tried with the theme mkdocs and there is no blank page. Is it normal ? how to personalize this page ? material : 5.2.2 pdf-export : 0.5.6 python : 3.5.2

t-f-x commented 4 years ago

this is a problem of CSS injected by the pdf theme

Kanaduchi commented 4 years ago

I have the same issue. What was the problem in CSS?

t-f-x commented 4 years ago

the problem is on the file mkdocs_pdf_export_plugin/themes/material.py that inject CSS. you need to remove the .md-main__inner property because this element insert a blank page. after that, you need to add several properties to adjust page layout (like describe on the README.md). if you need a 'first page' with the name of the document for example, you must insert a @page first properties on the CSS.

Kanaduchi commented 4 years ago

Thank you! It helps me!

pohlt commented 2 years ago

I fixed this issue by adding

.md-main__inner {
    height: 0% !important;
}

to style.css which I added as an extra_css in mkdocs.yml.