Comments (4)
Let's create another issue for the em
case.
I am closing this for the "rem" case until there is a spec for this available. I don't see that this can be an important use-case as long as it only works inside the HTML DOM in a browser.
from svg2pdf.js.
Not sure whether "rem" is officially supported in SVGs, not even SVG2 seems to be clear on this: https://svgwg.org/svg2-draft/types.html#InterfaceSVGLength
And I don't think browsers, agree with the implementation, either: https://bugzilla.mozilla.org/show_bug.cgi?id=1231147
How should the size be determined for an SVG embedded into a PDF? Font sizes relative to what?
from svg2pdf.js.
How should the size be determined for an SVG embedded into a PDF? Font sizes relative to what?
I guess it should work similarly to the em
only being relative to the top element - demo.
Indeed the SVG2 documention doesn't mention the rem
.
However percentages are there and they also don't work correctly- demo.
from svg2pdf.js.
OK - the latter should have been fixed in #100 but might not work for the CSS attributes, but only for the "real" SVG attributes.
I don't think that "rem" is something we should support until it's clear how it should behave, i.e. until there is actually a spec other than prior art in existing implementations that use the HTML document root, which really doesn't make sense in the context of svg2pdf, IMHO.
from svg2pdf.js.
Related Issues (20)
- Source map points to nonexisting `src/` folder in `npm` package HOT 1
- The transform-origin attribute of svg is rendered into pdf, which is not visible HOT 1
- TypeError: t.toFixed is not a function HOT 6
- Acrobat Always Asks to Save Changes to "unmodified" File on Close of PDF HOT 5
- Underline and shadow of text not converted to pdf
- stroke-width="inherit" breaks in jsPDF HOT 2
- SVG is not properly rendered in the pdf HOT 4
- Force stroke='none' if 'stroke-width' === 0 HOT 3
- Support for XML HOT 1
- SVG is upscaled in the pdf-file HOT 3
- Artifacts at letter s of font Aleo after conversion - but font Aleo itself has no such issue in jspdf HOT 5
- Latest master doesn't build HOT 1
- Excess clipping of nested SVG HOT 8
- Marker clipping HOT 2
- Error: Invalid argument passed to jsPDF.scale Error HOT 4
- Black background added to paths HOT 8
- Chinese is not supported HOT 2
- The exported PDF is not rendering custom fonts on some of the PDF text objects. HOT 8
- How to concatenate multiple SVG files? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svg2pdf.js.