Code Monkey home page Code Monkey logo

Comments (5)

GjjvdBurg avatar GjjvdBurg commented on July 26, 2024 1

It's been a while, but I probably used ImageMagick to convert directly from PDF to PNG, as this gives better results. To set custom fonts you can use the preamble field for the latex options.

from labella.py.

SeaDude avatar SeaDude commented on July 26, 2024

Hm... even trying https://svgtopng.com/ to convert the .svg to .png results in the same remnants. Its probably not with cairosvg.
I'm curious to see how you do this.

With the customized font on the textfn option removed, https://svgtopng.com/ conversion works. But the cairosvg code does not work.

from labella.py.

SeaDude avatar SeaDude commented on July 26, 2024

Aha...leaving the {\\fontfamily{phv}\\selectfont" customization off of the textfn option seems to work.

  • Though ideally I'd like to change the font

But, now the width of each timeline event isn't proportional to the text:

  • Also the left margin is cutting off the months of the timeline

    • This is fixed with "margin": {"left": 70, "right": 20, "top": 20, "bottom": 20}, setting
  • image

  • NOTE: This is only for the .png generated by the code above (cairosvg)

    • The .pdf and the converted .svg-to-.png using svgtopdg.com seem to work ok

from labella.py.

GjjvdBurg avatar GjjvdBurg commented on July 26, 2024

I'll close this issue as it appears to be resolved. Please reopen if that's not the case.

from labella.py.

SeaDude avatar SeaDude commented on July 26, 2024

Right on. I spend a decent amount of time trying to install Wand / ImageMagick on Windows 10. Ew! I wasn't successful. I will try another PDF-PNG conversion.

Thank you!

from labella.py.

Related Issues (15)

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.