orzih / mkdocs-with-pdf

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

QR code is not displayed on back cover when PDF is generated via GitLab Pages pipeline #83

Closed hmsdoc closed 1 year ago

hmsdoc commented 2 years ago

Hi, I've noticed a problem where the QR code on the back cover is not displayed when the PDF is generated via a GitLab Pages pipeline. In this case the back cover is displayed as expected but the rectangle, where the QR code should be displayed, remains empty.

When I try it locally via Docker, the QR code is displayed as expected. I've used the exact same configuration locally and on GitLab. The console output of the GitLab pipeline did not show any errors.

Is there a way how to fix this? Are there any configuration parameters for the QR code?

Thanks in advance!

antonengelhardt commented 1 year ago

@hmsdoc Can you provide your gitlab-ci.yml file? I cant get it work :D

hmsdoc commented 1 year ago

@antonengelhardt: It's been a while since I noticed this issue. Since then there have been some changes to the .gitlab-ci.yml file. I tested it again today and the QR code was displayed as expected. I was also not able to reproduce it again. So I guess the problem was caused by my .gitlab-ci.yml file.

antonengelhardt commented 1 year ago

I was just asking because I couldn't get my ci file to work and I thought you'd be able to help me. Happy to hear that it works for you. @hmsdoc

hmsdoc commented 1 year ago

@antonengelhardt: Sorry, I don't think my specific .gitlab-ci.yml file would be of much help. I'm using a customized mkdocs-material base image with mike as additional package for versioning a multi-language documentation.

But if you are also using the MkDocs Material theme it should theoretically work if you use the minimal example in the official docs and extend it by installing mkdocs-with-pdf including all its dependencies (e.g. WeasyPrint and qrcode). If all dependencies are installed you only have to enable the back cover page of the PDF in your mkdocs.yml file via back_cover: true and it should work.

antonengelhardt commented 1 year ago

@hmsdoc Yes, the installation was the hard part. The Project is already done and I don't really need it anymore. But thank you very much anyways !