In Inkscape, can I link to a pdf/svg instead of embedding its content?
I am using Inkscape as a canvas to layout existing PDF/SVG/PNG plots that I have made in Python, and then add some details and text to the overall figure. When I import the PDF/SVG files via
File >> Import... >> Link, they are embedded in Inkscape. I have noticed that if I do this with a raster image I get the option to link to the file instead of embedding it, so that when I update the plots in Python, they are automatically updated in Inkscape.
I can not find how to link to PDF/SVG files in the same way. I wish to keep the full resolution PDF/SVG plots, instead of using rasters. My friend showed me how to do it in Adobe Illustrator with PDFs, but is this possible in Inkscape?
You can link an Inkscape SVG inside another Inkscape SVG such that the linked file auto-updates in all files using it, like a linked raster image would. This is accomplished using the
<image /> tag as follows:
- Create an image called
- Use the same location as the SVG to link.
- Use the same dimensions as linked image will be in the parent SVG.
dummy.pngas a raster image.
- Right-click the image.
- Select Image Properties.
- Set URL to the SVG file (use a relative URL).
The graphic will auto-update every time your linked SVG is updated, but will not be editable inside the host SVG file.
Alternatively, render a raster image of the source SVG itself and replace its URL with the SVG file's URL.