Mobile app version of vmapp.org
Login or Join
Steve758

: In Inkscape, can I link to a pdf/svg-file 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

@Steve758

Posted in: #Inkscape #Pdf #Svg #Vector

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 instead, I get to 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 this is possible in Adobe Illustrator with pdfs, but I can't seem to figure it out in Inkscape, is it possible? If so, how do I go about it?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Steve758

2 Comments

Sorted by latest first Latest Oldest Best

 

@Odierno310

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 dummy.png.


Use the same location as the SVG to link.
Use the same dimensions as linked image will be in the parent SVG.

Import dummy.png as 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.

10% popularity Vote Up Vote Down


 

@Heady304

When you import a vector file into inkscape, it comes in as a group of vector objects. Thus resolution isn't an issue. I do this a lot for graphs from origin and python/matplotlib. This is easy to check - -click on a curve in your graph and select the "edit paths by node" tool (F2) - you'll be able to edit the nodes.

Auto-updating would be nice, but I don't think it can be done as a user (and I include simple extensions here). I've just tried hand-hacking an svg file to link a pdf (or svg) instead of a png, and the new file can't be found (I get a placeholder image containing "☒ Linked image not found").

If you have rasters embedded in your source svg/pdf files, I'm not sure what would happen to the resolution. The only time I've ever had to deal with this the images (cropped from microscope photos) were so low resolution that they were upscaled anyway and I didn't lose out further. I doubt you have problems with embedded rasters in python graphs anyway.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme