An MkDocs plugin to export content pages as PDF files

Overview

MkDocs PDF Export Plugin Build Status

An MkDocs plugin to export content pages as PDF files

The pdf-export plugin will export all markdown pages in your MkDocs repository as PDF files using WeasyPrint. The exported documents support many advanced features missing in most other PDF exports, such as a PDF Index and support for CSS paged media module.

Requirements

  1. This package requires MkDocs version 1.0 or higher (0.17 works as well)
  2. Python 3.4 3.5 or higher
  3. WeasyPrint depends on cairo, Pango and GDK-PixBuf which need to be installed separately. Please follow the installation instructions for your platform carefully:
  4. Explicit support for your mkdocs theme is probably required. As of now, the only supported theme is mkdocs-material. A generic version will just generate the PDF files and put the download link into a <link> tag.

If you want to add a new theme, see adding support for new themes for more information.

Installation

Install the package with pip:

pip install mkdocs-pdf-export-plugin

Enable the plugin in your mkdocs.yml:

plugins:
    - search
    - pdf-export

Note: If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. MkDocs enables it by default if there is no plugins entry set, but now you have to enable it explicitly.

More information about plugins in the MkDocs documentation.

Testing

When building your repository with mkdocs build, you should now see the following message at the end of your build output:

Converting 17 files to PDF took 15.6s

In your site_dir you should now have a PDF file for every markdown page.

Options

You may customize the plugin by passing options in mkdocs.yml:

plugins:
    - pdf-export:
        verbose: true
        media_type: print
        enabled_if_env: ENABLE_PDF_EXPORT

verbose

Setting this to true will show all WeasyPrint debug messages during the build. Default is false.

media_type

This option allows you to use a different CSS media type (or a custom one like pdf-export) for the PDF export. Default is print.

enabled_if_env

Setting this option will enable the build only if there is an environment variable set to 1. This is useful to disable building the PDF files during development, since it can take a long time to export all files. Default is not set.

combined

Setting this to true will combine all pages into a single PDF file. All download links will point to this file. Default is false.

combined_output_path

This option allows you to use a different destination for the combined PDF file. Has no effect when combined is set to false. Default is pdf/combined.pdf.

theme_handler_path

This option allows you to specify a custom theme handler module. This path must be relative to your project root (See example below). Default is not set.

mkdocs.yml:

plugins:
    - pdf-export:
        theme_handler_path: theme-handler.py
project-root
├── theme-handler.py
├── docs
├── mkdocs.yml
├── site
.
.

Adjusting the output

The resulting PDF can be customized easily by adding a custom stylesheet such as the following:

@page {
    size: a4 portrait;
    margin: 25mm 10mm 25mm 10mm;
    counter-increment: page;
    font-family: "Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;
    white-space: pre;
    color: grey;
    @top-left {
        content: '© 2018 My Company';
    }
    @top-center {
        content: string(chapter);
    }
    @top-right {
        content: 'Page ' counter(page);
    }
}

For this to take effect, use the extra_css directive in mkdocs.yml, as described in the MkDocs user guide.

Adding support for new themes

If you use a mkdocs theme which is currently not supported, check out the themes/material.py file and adjust it according to your requirements. You will have to implement two methods to support a theme:

  1. get_stylesheet should return a CSS which gets applied to fix issues with weasyprint
  2. modify_html should add a link to the PDF download before writing it to disk

If there is no explicit support for your theme, the generic version will just add a <link> tag in the head pointing to the generated PDF.

Contributing

From reporting a bug to submitting a pull request: every contribution is appreciated and welcome. Report bugs, ask questions and request features using Github issues. If you want to contribute to the code of this project, please read the Contribution Guidelines.

Special thanks

Special thanks go to Stephan Hauser for the original development of this plugin.

Special thanks go to Lukas Geiter for developing the mkdocs-awesome-pages-plugin which was used as a base and for convincing Stephan Hauser to write a plugin for this.

Comments
  • Support relative PDF links

    Support relative PDF links

    Currently, links such as [Topic](topic.md) become absolute links to their appropriate HTML files such as file:///a/b/site/topic.html.

    This implements a preprocessor to overwrite all the hrefs accordingly.

    No support for combined PDF yet - this would require perhaps a generated id to replace all the anchor and href IDs of the single PDF document due to collision between naming of anchor IDs in multiple .md files.

    Fixes #28.

    opened by zhaoterryy 9
  • External Markdown Links are pointing to physical location of HTML

    External Markdown Links are pointing to physical location of HTML

    I'm currently using 0.5.0 and I'm having an issue with the PDF generation of a pretty large documentation base. We are using a lot of internal links between our documentation pages and sections and we're seeing something new in our PDF generated file (We are almost certain that this works, at some point...).

    When using a link like the following in our documentation [Topic](topic.md), this works nicely in our website but produces a link to the physical generated file (file:///Users/vsts/agent/2.144.0/work/1/s/site/topic/). It does that in our CI/CD environment and does it also in all our local builds.

    Anything we should change to make sure the links are clickable through the PDF document?

    Thanks!

    bug 
    opened by sebastienlevert 9
  • Error with new MkDocs 1.0, initial Fix.

    Error with new MkDocs 1.0, initial Fix.

    Hi i have troubles with new MkDocs 1.0, the error was:

    ... result = method(item, **kwargs) File "/usr/lib/python3.6/site-packages/mkdocs_pdf_export_plugin/plugin.py", line 54, in on_post_page path = os.path.dirname(page.abs_output_path) AttributeError: 'Page' object has no attribute 'abs_output_path'

    I fixed this lines 'mkdocs_pdf_export_plugin/plugin.py':

    53 54 #path = os.path.dirname(page.abs_output_path) 55 path = os.path.dirname(page.file.abs_dest_path) 56 os.makedirs(path, exist_ok=True) 57 58 #filename = os.path.splitext(os.path.basename(page.input_path))[0] 59 filename = os.path.splitext(os.path.basename(page.file.src_path))[0] 60 61 base_url = urls.path2url(os.path.join(path, filename))

    Then run ok, but not display PDF to download on html build. Thanks in advance.

    opened by erickjx 8
  • mkdocs 1.1 incompatibility

    mkdocs 1.1 incompatibility

    Upgrade to mkdocs breaks pfd plugin loading

    Traceback (most recent call last):
      File "/home/nero/repos/mkdocs/vpy/bin/mkdocs", line 8, in <module>
        sys.exit(cli())
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/click/core.py", line 764, in __call__
        return self.main(*args, **kwargs)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/click/core.py", line 717, in main
        rv = self.invoke(ctx)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/click/core.py", line 956, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/click/core.py", line 555, in invoke
        return callback(*args, **kwargs)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs/__main__.py", line 159, in build_command
        build.build(config.load_config(**kwargs), dirty=not clean)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs/config/base.py", line 197, in load_config
        errors, warnings = cfg.validate()
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs/config/base.py", line 107, in validate
        run_failed, run_warnings = self._validate()
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs/config/base.py", line 62, in _validate
        self[key] = config_option.validate(value)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs/config/config_options.py", line 130, in validate
        return self.run_validation(value)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs/config/config_options.py", line 591, in run_validation
        plgins[item] = self.load_plugin(item, cfg)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs/config/config_options.py", line 599, in load_plugin
        Plugin = self.installed_plugins[name].load()
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2445, in load
        return self.resolve()
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2451, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs_pdf_export_plugin/plugin.py", line 9, in <module>
        class PdfExportPlugin(BasePlugin):
      File "/home/nero/repos/mkdocs/vpy/lib/python3.6/site-packages/mkdocs_pdf_export_plugin/plugin.py", line 14, in PdfExportPlugin
        ('media_type', config_options.Type(utils.string_types, default=DEFAULT_MEDIA_TYPE)),
    AttributeError: module 'mkdocs.utils' has no attribute 'string_types'
    

    my mkdocs.yml

    site_name: My Documentation
    
    # use a theme with pdf support, examples
    # mkdocs (default)
    # cinder
    # material
    theme: cinder
    
    markdown_extensions:
      - markdown_katex:
          no_inline_svg: false    # needed for inline math formulas
          insert_fonts_css: true
    
    plugins:
      - pdf-export:
          verbose: false
          media_type: print
          enabled_if_env: ENABLE_PDF_EXPORT
          combined: false
          #combined_output_path: pdf/combined.pdf
          #theme_handler_path: themes/handler.py
    

    html generation works if I uncomment the plugins directive. Just not setting the environment variable is not enough

    the latest commit did remove the attribute string_types, and it is recommended to just use str instead of the string_type variable https://github.com/mkdocs/mkdocs/commit/c9032bd6bfde09ead2f4f879e85590d7cd6e68a6#diff-d65996b966b539b8298e7f90a78d1303L79

    opened by NeroBurner 7
  • Material theme admonition icons do not render correctly

    Material theme admonition icons do not render correctly

    When generating PDFs from material-theme style docs with admonition blocks, the material icons do not get rendered correctly. It seems like something goes wrong when adding the font to the pdf.

    Example:

    image

    Looks like

    image

    Log output:

    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.eot#iefix&v=4.7.0"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0"
    ERROR: Failed to load font at "file:///tmp/tmpw6mo9adz/assets/fonts/specimen/MaterialIcons-Regular.woff2"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.eot#iefix&v=4.7.0"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0"
    ERROR: Failed to load font at "file:///tmp/tmpw6mo9adz/assets/fonts/specimen/MaterialIcons-Regular.woff2"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.eot#iefix&v=4.7.0"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0"
    ERROR: Failed to load font at "file:///tmp/tmpw6mo9adz/assets/fonts/specimen/MaterialIcons-Regular.woff2"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.eot#iefix&v=4.7.0"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0"
    ERROR: Failed to load font at "file:///tmp/tmpw6mo9adz/assets/fonts/specimen/MaterialIcons-Regular.woff2"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.eot#iefix&v=4.7.0"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0"
    ERROR: Failed to load font at "file:///tmp/tmpw6mo9adz/assets/fonts/specimen/MaterialIcons-Regular.woff2"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.eot#iefix&v=4.7.0"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0"
    ERROR: Failed to load font at "file:///tmp/tmpw6mo9adz/assets/fonts/specimen/MaterialIcons-Regular.woff2"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.eot#iefix&v=4.7.0"
    ERROR: Failed to load font at "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0"
    ...
    
    investigate 
    opened by Raqbit 7
  • ValueError: unknown locale: UTF-8

    ValueError: unknown locale: UTF-8

    I get the following error when executing mkdocs build while pdf-export is enabled.

    ➜ mkdocs-material-master mkdocs build Traceback (most recent call last): File "/usr/local/bin/mkdocs", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.7/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/mkdocs/__main__.py", line 162, in build_command site_dir=site_dir File "/usr/local/lib/python3.7/site-packages/mkdocs/config/base.py", line 197, in load_config errors, warnings = cfg.validate() File "/usr/local/lib/python3.7/site-packages/mkdocs/config/base.py", line 107, in validate run_failed, run_warnings = self._validate() File "/usr/local/lib/python3.7/site-packages/mkdocs/config/base.py", line 62, in _validate self[key] = config_option.validate(value) File "/usr/local/lib/python3.7/site-packages/mkdocs/config/config_options.py", line 132, in validate return self.run_validation(value) File "/usr/local/lib/python3.7/site-packages/mkdocs/config/config_options.py", line 572, in run_validation plgins[item] = self.load_plugin(item, cfg) File "/usr/local/lib/python3.7/site-packages/mkdocs/config/config_options.py", line 580, in load_plugin Plugin = self.installed_plugins[name].load() File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2325, in load return self.resolve() File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2331, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/local/lib/python3.7/site-packages/mkdocs_pdf_export_plugin/plugin.py", line 8, in <module> from weasyprint import HTML, urls File "/usr/local/lib/python3.7/site-packages/weasyprint/__init__.py", line 375, in <module> from .css import preprocess_stylesheet # noqa File "/usr/local/lib/python3.7/site-packages/weasyprint/css/__init__.py", line 30, in <module> from .descriptors import preprocess_descriptors File "/usr/local/lib/python3.7/site-packages/weasyprint/css/descriptors.py", line 20, in <module> from .validation import ( File "/usr/local/lib/python3.7/site-packages/weasyprint/css/validation.py", line 25, in <module> from ..images import LinearGradient, RadialGradient File "/usr/local/lib/python3.7/site-packages/weasyprint/images.py", line 20, in <module> import cairosvg.parser File "/usr/local/lib/python3.7/site-packages/cairosvg/__init__.py", line 29, in <module> from . import surface File "/usr/local/lib/python3.7/site-packages/cairosvg/surface.py", line 27, in <module> from .defs import ( File "/usr/local/lib/python3.7/site-packages/cairosvg/defs.py", line 24, in <module> from .bounding_box import calculate_bounding_box, is_non_empty_bounding_box File "/usr/local/lib/python3.7/site-packages/cairosvg/bounding_box.py", line 26, in <module> from .features import match_features File "/usr/local/lib/python3.7/site-packages/cairosvg/features.py", line 25, in <module> LOCALE = locale.getdefaultlocale()[0] or '' File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 568, in getdefaultlocale return _parse_localename(localename) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 495, in _parse_localename raise ValueError('unknown locale: %s' % localename) ValueError: unknown locale: UTF-8

    For reproduction: I used the https://github.com/squidfunk/mkdocs-material Repro for testing purposes.

    bug 
    opened by lukasreussner 7
  • first page is blank

    first page is blank

    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

    opened by t-f-x 5
  • When using combined PDF, the page number are restarted for every article

    When using combined PDF, the page number are restarted for every article

    We love the new page order as it respects nicely our nav structure, but we're seeing issues with the current page numbers. Page numbers are restarting for every section as it's probably considered to be multiple documents and page numbers are defined per document.

    Anything we can do to do the opposite, where if I have 201 pages, I should see Page 1 of 201, 2 of 201, etc...?

    Thanks!

    bug good first issue combined 
    opened by sebastienlevert 5
  • mkdocs build with -pdf-export throws errors

    mkdocs build with -pdf-export throws errors

    Tested on both macOs and windows. Any thought on how to fix? Thx in advance

    1. Python 3.7.1

    2. site_name: My Docs theme: name: 'material' plugins:

      • search
      • pdf-export
    3. Errror:LMHQUCIS245764:system-modernization-BOK erchasin$ mkdocs build Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/mkdocs", line 11, in sys.exit(cli()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 764, in call return self.main(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mkdocs/main.py", line 163, in build_command ), dirty=not clean) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mkdocs/commands/build.py", line 240, in build config = config['plugins'].run_event('config', config) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mkdocs/plugins.py", line 94, in run_event result = method(item, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mkdocs_pdf_export_plugin/plugin.py", line 43, in on_config from .renderer import Renderer File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mkdocs_pdf_export_plugin/renderer.py", line 4, in from weasyprint import HTML, Document File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/weasyprint/init.py", line 393, in from .css import preprocess_stylesheet # noqa File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/weasyprint/css/init.py", line 25, in from . import computed_values File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/weasyprint/css/computed_values.py", line 17, in from .. import text File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/weasyprint/text.py", line 14, in import cairocffi as cairo File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cairocffi/init.py", line 41, in cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/cairocffi/init.py", line 38, in dlopen raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names)) OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2 LMHQUCIS245764:system-modernization-BOK erchasin$

    opened by echasin 5
  • CSS for output hardcoded in theme_name.py

    CSS for output hardcoded in theme_name.py

    Looking at the theme files, it looks like the CSS is hardcoded in there and there is no way to override it.

    As most of the mkdocs CSS usually resides in ~/css/ it would be nice to be able to drop a CSS file in there and have it pick it up.

    ie ~/css/mkdocs-pdf-material.css or something.

    opened by eloops 5
  • Failure to load woff2 fonts on Linux

    Failure to load woff2 fonts on Linux

    Hello,

    I am using mkdocs with material theme. I follow documentation and I think install everything as needed. python -m weasyprint http://weasyprint.org weasyprint.pdf is working properly

    $ mkdocs --version
    mkdocs, version 1.0.4 from /home/bretif/dev/mkdocs/skinfra-mkdocs/py3/lib/python3.5/site-packages/mkdocs (Python 3.5)
    

    If I try to build my site but I get this error

    ERROR: Failed to load font at "file:///home/bretif/dev/mkdocs/skinfra-mkdocs/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
    ERROR: Failed to load font at "file:///home/bretif/dev/mkdocs/skinfra-mkdocs/site/assets/fonts/specimen/FontAwesome.woff2"
    

    However these files exist:

    $ ls -l /home/bretif/dev/mkdocs/skinfra-mkdocs/site/assets/fonts/specimen/MaterialIcons-Regular.woff2
    -rw-r--r-- 1 bretif psi 44300 sept. 25 11:37 /home/bretif/dev/mkdocs/skinfra-mkdocs/site/assets/fonts/specimen/MaterialIcons-Regular.woff2
    
    $ ls -l /home/bretif/dev/mkdocs/skinfra-mkdocs/site/assets/fonts/specimen/FontAwesome.woff2                                      
    -rw-r--r-- 1 bretif psi 77160 sept. 25 11:37 /home/bretif/dev/mkdocs/skinfra-mkdocs/site/assets/fonts/specimen/FontAwesome.woff2
    

    Do you have any clue of what is wrong with my setup.

    Regards Bertrand

    wontfix 
    opened by bretif 5
  • chore(deps): bump pillow from 6.2.2 to 9.3.0

    chore(deps): bump pillow from 6.2.2 to 9.3.0

    Bumps pillow from 6.2.2 to 9.3.0.

    Release notes

    Sourced from pillow's releases.

    9.3.0

    https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    9.3.0 (2022-10-29)

    • Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [wiredfool]

    • Initialize libtiff buffer when saving #6699 [radarhere]

    • Inline fname2char to fix memory leak #6329 [nulano]

    • Fix memory leaks related to text features #6330 [nulano]

    • Use double quotes for version check on old CPython on Windows #6695 [hugovk]

    • Remove backup implementation of Round for Windows platforms #6693 [cgohlke]

    • Fixed set_variation_by_name offset #6445 [radarhere]

    • Fix malloc in _imagingft.c:font_setvaraxes #6690 [cgohlke]

    • Release Python GIL when converting images using matrix operations #6418 [hmaarrfk]

    • Added ExifTags enums #6630 [radarhere]

    • Do not modify previous frame when calculating delta in PNG #6683 [radarhere]

    • Added support for reading BMP images with RLE4 compression #6674 [npjg, radarhere]

    • Decode JPEG compressed BLP1 data in original mode #6678 [radarhere]

    • Added GPS TIFF tag info #6661 [radarhere]

    • Added conversion between RGB/RGBA/RGBX and LAB #6647 [radarhere]

    • Do not attempt normalization if mode is already normal #6644 [radarhere]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • How to get scrollable code boxes in generated PDFs, or at least remove line breaks from wrapped lines in code boxes?

    How to get scrollable code boxes in generated PDFs, or at least remove line breaks from wrapped lines in code boxes?

    I am completely new to mkdocs and its plugins. I am currently writing a documentation that contains code blocks with some very long lines. I am using the material theme. The code blocks are showing as expected on the HTML pages. That is, they have a horizontal scroll bar if they contain lines that are too long to fit into the page width. That horizontal scroll bar can be operated as usual.

    Is it possible to have such (horizontally) scrollable code blocks in the generated PDF documents as well?

    Currently, the code blocks in the PDF wrap long lines, which imposes two problems:

    First, it is very worrying for persons who read the PDF, because in code blocks they can't see whether a new line actually is a new line or is the continuation of the line above.

    Second, when copying a wrapped long line from a code block in the PDF, the copied text contains line breaks where the line has been wrapped. This makes people unable to use the copied text directly, e.g. to paste it into a terminal as a new command line, without having to alter it before.

    If we can't have scrollable code blocks in the PDF (but I still hope we can), what do I need to do to at least remove the line breaks mentioned above?

    Thank you very much in advance, and best regards,

    Binarus

    opened by Binarus 0
  • Adding margin to extra css has no effect

    Adding margin to extra css has no effect

    https://github.com/zhaoterryy/mkdocs-pdf-export-plugin#adjusting-the-output

    I added the above configuration to the extra css of the project below, top-left top-center and top-right take effect, but margin has no effect. https://github.com/LearnOpenGL-CN/LearnOpenGL-CN/blob/new-theme/docs/css/style.css

    opened by CodeLife2012 0
  • Two buttons created and Language issue

    Two buttons created and Language issue

    The plugin will create two Export buttons on the page, and cannot generate Chinese page as PDF, I have added a extra css for the plugin, and it is still not working image

    font-family: 'Microsoft YaHei', 'WenQuanYi Micro Hei Mono', 'Material Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    opened by roddc 1
  • Font spacing issue

    Font spacing issue

    When using the pdf export tool within a CI pipeline, the PDF has odd spacing issues with the output. The alpine base container has had the fonts installed as part of the build using the following:

    RUN apk add fontconfig ttf-roboto ttf-roboto-mono ttf-font-awesome ttf-freefont font-noto terminus-font \
        && fc-cache -f \
        && fc-list | sort
    

    However the PDF is output with odd spacing in the fonts, as per the screenshot below:

    image

    Nothing I change seems to fix this - any idea what could be causing it?

    opened by tomjones1977 7
Releases(v0.5.8)
Owner
Terry Zhao
cruising @ exactly 42 🤷‍♂️/day
Terry Zhao
Proyecto - Desgaste y rendimiento de empleados de IBM HR Analytics

Acceder al código desde Google Colab para poder ver de manera adecuada todas las visualizaciones y poder interactuar con ellas. Links de acceso: Noteb

1 Jan 31, 2022
:blue_book: Automatic documentation from sources, for MkDocs.

mkdocstrings Automatic documentation from sources, for MkDocs. Features Python handler features Requirements Installation Quick usage Features Languag

Timothée Mazzucotelli 1.1k Dec 31, 2022
Grokking the Object Oriented Design Interview

Grokking the Object Oriented Design Interview

Tusamma Sal Sabil 2.6k Jan 08, 2023
A Sublime Text plugin to select a default syntax dialect

Default Syntax Chooser This Sublime Text 4 plugin provides the set_default_syntax_dialect command. This command manipulates a syntax file (e.g.: SQL.s

3 Jan 14, 2022
A Python module for creating Excel XLSX files.

XlsxWriter XlsxWriter is a Python module for writing files in the Excel 2007+ XLSX file format. XlsxWriter can be used to write text, numbers, formula

John McNamara 3.1k Dec 29, 2022
Generate modern Python clients from OpenAPI

openapi-python-client Generate modern Python clients from OpenAPI 3.x documents. This generator does not support OpenAPI 2.x FKA Swagger. If you need

555 Jan 02, 2023
Elliptic curve cryptography (ed25519) beginner tutorials in Python 3

ed25519_tutorials Elliptic curve cryptography (ed25519) beginner tutorials in Python 3 Instructions Just download the repo and read the tutorial files

6 Dec 27, 2022
Generate a backend and frontend stack using Python and json-ld, including interactive API documentation.

d4 - Base Project Generator Generate a backend and frontend stack using Python and json-ld, including interactive API documentation. d4? What is d4 fo

Markus Leist 3 May 03, 2022
layout-parser 3.4k Dec 30, 2022
Parser manager for parsing DOC, DOCX, PDF or HTML files

Parser manager Description Parser gets PDF, DOC, DOCX or HTML file via API and saves parsed data to the database. Implemented in Ruby 3.0.1 using Acti

Эдем 4 Dec 04, 2021
Contains the assignments from the course Building a Modern Computer from First Principles: From Nand to Tetris.

Contains the assignments from the course Building a Modern Computer from First Principles: From Nand to Tetris.

Matheus Rodrigues 1 Jan 20, 2022
Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02

Mini-project report Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02 Introduction This project was

1 Nov 08, 2021
EasyModerationKit is an open-source framework designed to moderate and filter inappropriate content.

EasyModerationKit is a public transparency statement. It declares any repositories and legalities used in the EasyModeration system. It allows for implementing EasyModeration into an advanced charact

Aarav 1 Jan 16, 2022
Show Rubygems description and annotate your code right from Sublime Text.

Gem Description for Sublime Text Show Rubygems description and annotate your code. Just mouse over your Gemfile's gem definitions to show the popup. s

Nando Vieira 2 Dec 19, 2022
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

Master (2.4.25-SNAPSHOT): 3.0.31-SNAPSHOT: Maven Central ⭐ ⭐ ⭐ If you would like to contribute, please refer to guidelines and a list of open tasks. ⭐

Swagger 15.2k Dec 31, 2022
Materi workshop "Light up your Python!" Himpunan Mahasiswa Sistem Informasi Fakultas Ilmu Komputer Universitas Singaperbangsa Karawang, 4 September 2021 (Online via Zoom).

Workshop Python UNSIKA 2021 Materi workshop "Light up your Python!" Himpunan Mahasiswa Sistem Informasi Fakultas Ilmu Komputer Universitas Singaperban

Eka Putra 20 Mar 24, 2022
Sane and flexible OpenAPI 3 schema generation for Django REST framework.

drf-spectacular Sane and flexible OpenAPI 3.0 schema generation for Django REST framework. This project has 3 goals: Extract as much schema informatio

T. Franzel 1.4k Jan 08, 2023
Explain yourself! Interrogate a codebase for docstring coverage.

interrogate: explain yourself Interrogate a codebase for docstring coverage. Why Do I Need This? interrogate checks your code base for missing docstri

Lynn Root 435 Dec 29, 2022
Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts

Have you always wished Jupyter notebooks were plain text documents? Wished you could edit them in your favorite IDE? And get clear and meaningful diff

Marc Wouts 5.7k Jan 04, 2023
Projeto em Python colaborativo para o Bootcamp de Dados do Itaú em parceria com a Lets Code

🧾 lets-code-todo-list por Henrique V. Domingues e Josué Montalvão Projeto em Python colaborativo para o Bootcamp de Dados do Itaú em parceria com a L

Henrique V. Domingues 1 Jan 11, 2022