orzih / mkdocs-with-pdf

Generate a single PDF file from MkDocs repository.
MIT License
324 stars 76 forks source link

Declaring the with-pdf plugin fails if GObjects is not present #128

Open ddidier opened 1 year ago

ddidier commented 1 year ago

My use case is as follow:

  1. some users have an environment with GObjects (on Linux and on the CI) and want to generate the PDF
  2. some users have an environment without GObjects (on Windows, and they cannot install it even if it's possible) and don't need to generate the PDF

But as the title says, declaring the with-pdf plugin in the mkdocs.yml fails if GObjects is not present. So it would be great if the GObjects import was done only when the PDF is generated.

Thanks

stefaneidelloth commented 1 year ago

Related:

https://stackoverflow.com/questions/69067530/how-to-solve-weasyprint-error-message-gobject-2-0-0-error-0x7e-message

https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#windows ("Only Windows 11 64-bit is supported")