Coder Social home page Coder Social logo

Comments (2)

Elvander avatar Elvander commented on June 11, 2024 1

I've found the reason.
The path for the image's while generating the PDF's is relative to the path of the md-file.

If you link the images relative to the md file the PDF generation works

![Pagina aanmaken](../../../images/signage/nl_signage_incident_aanmaak.png)
instead of
![Pagina aanmaken](/images/signage/nl_signage_incident_aanmaak.png)

I hope this helps others with the same issue!

from mkdocs-pdf-export-plugin.

majkinetor avatar majkinetor commented on June 11, 2024

I am having the same problem. Images are not shown in PDF output. Currently using 0.5.8, but it stopped few versions back.

Here is reproducible demo. It shows in build:

https://ci.appveyor.com/project/majkinetor/mm-docs-template#L61

ERROR: Relative URI reference without a base URI: <img src="/mm-docs-template/files/omg-lolcat.jpg">

Here are the artifacts:

  1. Demo page: https://majkinetor.github.io/mm-docs-template/demo/#local-files
  2. PDF: https://majkinetor.github.io/mm-docs-template/demo/demo.pdf#page=3
    • details on page 3

      image

This is the full code for docker image: https://github.com/majkinetor/mm-docs

It worked before, not sure when it stopped. The only suspicious thing in the build output is:

/usr/lib/python3.6/site-packages/weasyprint/document.py:36: UserWarning: There are known rendering problems and missing features with cairo < 1.15.4. WeasyPrint may work with older versions, but please read the note about the needed cairo version on the "Install" page of the documentation before reporting bugs. http://weasyprint.readthedocs.io/en/latest/install.html

from mkdocs-pdf-export-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.