Giter Club home page Giter Club logo

Comments (3)

galkahana avatar galkahana commented on July 20, 2024

There should be such a way. jpeg and tiff embedding is supported as a high level method in hummus, but svg is not. however, it should be possible to either embed a PDF version of that SVG acquired by other means than hummus, or translate it directly (as is how the implementation of JPG and TIFF images does).

I looked a little bit and came up with some links that might prove useful to you:

generics:

This one here:
https://github.com/ahwolf/jsPDF/blob/master/jspdf.plugin.svgToPdf.js

shows an interesting approach which translates the SVG to underlying library commands. This is possible with hummus as well, as hummus provides access to vector based graphic operators of PDF. You can focus on features that you think are more common in SVG files that you will receive and do something similar. if you choose this approach you will need to become a little familiar with PDF drawing operators. start with this link to learn about methods of adding such content to PDF:
https://github.com/galkahana/PDF-Writer/wiki/Adding-Content-to-PDF-Pages

from pdf-writer.

nashwaan avatar nashwaan commented on July 20, 2024

Thanks for your feedback.
The approaches and links you provided are useful. Need to investigate a bit more to decide which approach that will be faster to implement.

from pdf-writer.

 avatar commented on July 20, 2024

Any improvement on this?

from pdf-writer.

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.