inkscape

How to convert an SVG string into a jpg with Inkscape

流过昼夜 提交于 2019-12-04 01:09:37
问题 After having spent two days attempting to rasterize jpeg's from SVG strings using ImageMagick I have finally given up. Although I managed to get the actual conversion working fine it seems Imagemagick cannot properly convert the transform/rotate features correctly when rendering the image, leaving the output different to the original SVG. Having researched further it appears that this is a known issue and that 'Inkscape' is the best method to use for converting SVG into jpeg/png in PHP. The

Is there an efficient way to store 2D plots as a vector graphic in python?

一个人想着一个人 提交于 2019-12-03 21:15:08
I'm currently trying to store python plots as vector graphics to improve their appearance in a latex document. For 1D plots this works quite fine: import numpy as np import matplotlib as mpl mpl.use('svg') new_rc_params = { "font.family": 'Times', "font.size": 12, "font.serif": [], "svg.fonttype": 'none'} #to store text as text, not as path mpl.rcParams.update(new_rc_params) import matplotlib.pyplot as plt x = np.linspace(-.5, .5, 1024) plt.figure() plt.plot(x, x) plt.title('\$x = y\$') plt.xlabel('\$x\$ [m]') plt.ylabel('\$y\$ [m]') plt.savefig('test.svg', format = 'svg', bbox_inches = 'tight

How to save SVG file with Inkscape CLI?

a 夏天 提交于 2019-12-03 12:32:50
I'm working with Inkscape in cli no ( --without-gui or -z ) to : Select multiple nodes by id ( hanzi , pinyin ) ; Create an union of them ; Save as a new file ( test-union-cli.svg ). Command So I use this command: inkscape -z -f ./䖠-x45A0.svg \ --select=hanzi --select=pinyin \ --verb SelectionUnion --verb FileSaveCopyAs \ --verb=FileClose test-union-cli.svg Output error ** (inkscape:27462): CRITICAL * : Inkscape::XML::Document sp_repr_read_file(const gchar*, const gchar*): assertion `Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )' failed ** (inkscape:27462): CRITICAL * : Inkscape::XML

SVG: simplify path to remove curves?

情到浓时终转凉″ 提交于 2019-12-03 11:26:22
I have a svg file which contains complex paths with bezier curves in it. I need to convert this path-data to use it for html map-area's, so I in fact I need just the coordinates (but for large curves, it would be very nice to have some coordinates 'between' the two end-points. I tried Inkscape's simplify path function, but those paths still contain curves... Is there any tool or formula to convert these curves into simple coordinates? Maybe another Inkscape output-format that doesn't use curves in its coordinates? In Inkscape: Select the Edit Path By Nodes tool (F2). Click on your path to

Run inkscape in PHP

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to run inkscape in PHP so I can convert an svg image to PDF. However every time I try: //some PHP code system("inkscape -z --file=svg.svg --export-pdf=pdf.pdf"); //more code I get no new file and I get this in the apache erro log. (inkscape:28607): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission > denied Emergency save activated! Emergency save completed. Inkscape will close now. If you can reproduce this crash, please file a bug at www.inkscape.org with a detailed description of the steps leading to the crash

matplotlib - plot outputs text as paths and cannot be converted to LaTeX by Inkscape

不羁岁月 提交于 2019-12-03 04:59:50
问题 I have a matplotlib plot that I would like to save in a vector graphics format to then use in a LaTeX document. I normally save it from matplotlib , open it with Inkscape and save it as PDF+LaTeX (omit text in PDF and create LaTeX file). This can also be achieved with: inkscape -D -z --file=in.pdf --export-pdf=out.pdf --export-latex However, for the following plot, the text is actually a series of paths. Each letter is separate, resulting in Inkscape not being able to save a different tex

Inkscape command line: Need to convert SVG to eps without filter rasterisation

柔情痞子 提交于 2019-12-03 02:42:04
问题 I need to convert an SVG to EPS and currently use inkscape to do this. To convert the SVG using the Inkscape GUI version, I simply open the svg, and "Save As" 'logo.eps', unselecting the "Rasterize filter effects" option. However, I want to automate this process using the command line. Using inkscape logo.svg -E logo.eps works but does not disable filter rasterisation. I have done some research but can't figure out how to do this can anyone provide me the correct command? Thanks 回答1: The

error on line 39 at column 26: Namespace prefix xlink for href on script is not defined

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i am embedding a javascript file inside an svg file like this: <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="958.69" height="592.78998" id="svg2275" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docname="Map of

Inkscape .91 with latex

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Inkscape 0.91 and trying to add Latex math formula inside my graphics. After several hours of tying and fixes from the I am still not able make it work. I am on Windows 7 with the following, 1) pstoedit (pstoeditsetup_win32.exe) 2) GSview 5.0 (gsv50w32.exe) 3) Ghostscript 9.18 (gs918w32.exe) 4) miktex 2.59 64 bit version I have added the PATHs and did all the stuff. I can see the Latex extension as well but whenever I try to use it I face the following error: "Problem during opening C:\Program Files (x86)\pstoedit\drvmagick.dll

Using the Inkscape shell from perl

匿名 (未验证) 提交于 2019-12-03 01:01:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Inkscape has a shell mode invoked like this inkscape --shell where you can execute commands like this: some_svg_file.svg -e some_png_output.png -y 1.0 -b #ffffff -D -d 150 which will generate a PNG file, or like this: /home/simone/some_text.svg -S which gives you the bounding box of all elements in the file in the return message like this svg2,0.72,-12.834,122.67281,12.942 layer1,0.72,-12.834,122.67281,12.942 text2985,0.72,-12.834,122.67281,12.942 tspan2987,0.72,-12.834,122.67281,12.942 The benefit of this is that you can perform operations