zhaoterryy / mkdocs-pdf-export-plugin

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

Using mkdocs-material footnotes in causes build errors on certain pages #1

Closed shauser closed 5 years ago

shauser commented 6 years ago

If https://squidfunk.github.io/mkdocs-material/extensions/footnotes/ is used in a document, this causes the following error on some of the pages on Windows:

Error converting foo\bar.md to PDF: cairo returned 41: b'error occurred in the Windows Graphics Device Interface'

This affects the page using footnotes, as well as some other pages.

shauser commented 6 years ago

Stylesheet in use

@media print {
    .md-container {
        display: block;
        padding-top: 0;
    }

    .md-main {
        display: block;
        height: inherit;
    }

    .md-main__inner {
        height: inherit;
        padding-top: 0;
    }

    .md-typeset .footnote-ref {
        display: inline-block;
    }

    .md-typeset .admonition {
        display: block;
    }

    .md-typeset a::after {
        color: inherit;
        content: none;
    }
}
shauser commented 6 years ago

This was probably fixed with https://github.com/Kozea/WeasyPrint/issues/587. Test pending.