Comments (3)
mozilla/pdf.js#11473
It looks like tile-based rendering of PDF Patterns is tricky and other projects, including Mozilla, also facing (or at least faced) the same issue.
https://github.com/typst/svg2pdf/blob/main/src/render.rs#L427
Would it be a good alternative to avoid PDF Pattern syntax and replace SVG <pattern>
with multiple instances of content that should be repeated/tiled directly (e.g. line/rect/path/...) assuming that at this stage of the pipeline all the dimensions are already absolute (thanks to usvg) so it's possible to calculate how many items/cells need to be repeated?
from svg2pdf.
Is it something that can be fixed by modifying the SVG2PDF conversion flow? Since I could only reproduce this issue with then maybe there is an alternative way of representing it before trying to create PDF? 🤔
You probably could in theory try to emulate the pattern behavior, but I would imagine this to be a nightmare to implement, especially because patterns can also have transforms themselves and this would be very hard to recreate. Given that PDFs support patterns natively, we should also use them for that. It also would be very bad for performance. The best thing to do here would be to report this issue to Apple directly and hope that they fix it, since this is an issue on their side.
from svg2pdf.
I'm closing this since there isn't much we can do about that from our side.
from svg2pdf.
Related Issues (20)
- Text rendering support HOT 1
- Compress content streams
- Multiple pages HOT 3
- Text element support HOT 3
- Converting the Rust logo doesn't work HOT 3
- Embedded svg image render issues HOT 1
- Embed text rather than converting text to paths HOT 21
- Gradient transforms are not applied HOT 2
- line width/height defined with % is wrong HOT 12
- Nested SVG layout is wrong HOT 3
- Output has incorrect paper-size HOT 1
- [feature] Shell completion
- CLI compilation error
- Weird behavior when embedding image in SVG and specifying width/height in a unit other than px HOT 1
- Example for `convert_tree_into` does not compile HOT 1
- Make converted SVGs use up less space
- Add support for the `spreadMethod` attribute in gradients
- no any text HOT 3
- Existing font ignored HOT 10
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.