Embedded SVG paths don't get scaled
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- computer-graphics
Research direction
Unpack embedded-svg-bug.zip and compare japanese.svg, assembled.svg, and assembled.pdf. Reproduce the report with cairosvg ./assembled.svg -o ./assembled.pdf, then trace embedded-image rendering from the CairoSVG entry point. Done means paths inside the child SVG scale with its background in the generated PDF.
Written by the indexing model from the issue text.
Description
I'm generating an SVG file that links to other SVG files using <image> tags. When I view the resulting parent SVG in a browser, things look fine, but when I use CairoSVG to convert it to PDF, the paths inside the child SVG don't get scaled.
Attached are some examples that illustrate the problem. If you look at japanese.svg, you see a series of paths (baked from text) on a blue background, filling the viewbox. If you open assembled.svg in Firefox or Chrome, you can see that image, referenced via an <image> tag, centered and resized.
However, you can see in assembled.pdf the result of running cairosvg ./assembled.svg -o ./assembled.pdf. The background rectangle is appropriately sized, but the paths are not. (Screenshot below.)

I have control over the generation of both the child and the parent files, so if there's some change to the markup I can make which would fix this, please let me know. Otherwise I think this might be a bug.
- Dominant language
- Python
- Stars
- 959
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Kozea/CairoSVG
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
并发下的渲染表现Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Exception "The SVG size is undefined" raised using svg2pngPossibly taken @DSeaStar claimed this 111 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
feature
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Techiebutler/freeframe#687 ·
Maintainers usually reply within 1 day
-
bug verbose GC
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
IBM/javacore-analyser#677 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 2 days
-
area/config comp/plugins P1 platform/qqbot tool/file type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#163932 · 1 comment ·
Maintainers usually reply within 1 day
-
plugins/dsh: todayStr() computes UTC but is documented as local — journal entries written 00:00–08:00 local land in the previous day's filePossibly taken @Beehtrix claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#907 · 1 comment ·
Maintainers usually reply within 1 day