Skip to content

PDF not generated when using render_js=True #82

@sebascert

Description

@sebascert
Image

I'm attempting to generate a PDF of cp-algorithms, this is my fork.
When I don't use the render_js option every math expression is printed literally "$math$", but when I attempt to use it it outputs a pdf with a single page and the text in the image.

This is the output of mkdocs build:

(cmd)╰$ mkdocs build
INFO    -  git-committers plugin DISABLED
INFO    -  [macros] - No default module `main` found
INFO    -  git-committers: loading authors cache file
INFO    -  git-committers: saving authors cache file
INFO    -  [macros] - Config variables: ['extra', 'config',
           'environment', 'plugin', 'git', 'analytics', 'macros', 'filters',
           'filters_builtin']
INFO    -  [macros] - Config macros: ['context', 'macros_info', 'now',
           'fix_url']
INFO    -  [macros] - Config filters: ['pretty', 'relative_url']
INFO    -  Cleaning site directory
INFO    -  Building documentation to directory:
           /home/yoaquin/projects/cp-algorithms/public
INFO    -  Doc file 'algebra/discrete-log.md' contains a link
           'phi-function.md#toc-tgt-2', but the doc 'algebra/phi-function.md'
           does not contain an anchor '#toc-tgt-2'.
INFO    -  Number headings up to level 3.
INFO    -  Generate a table of contents up to heading level 2.
INFO    -  Generate a cover page with "default_cover.html.j2".
INFO    -  Converting <img> alignment(workaround).
INFO    -  Rendering on `Headless Chrome`(execute JS).
INFO    -  Rendering for PDF.
INFO    -  Output a PDF to
           "/home/yoaquin/projects/cp-algorithms/public/pdf/document.pdf".
INFO    -  Converting 166 articles to PDF took 45.2s
INFO    -  Documentation built in 65.08 seconds

I tested opening the PDF with multiple PDF viewers and all show the same, and I tested my headless chrome as in this guide, and it works fine, the output also shows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions