![]() ![]() inkscape -without-gui -actions="export-id-only export-id:Triangle export-filename:action_triangle.png export-do export-id:Path export-filename:action_path.png" export_test.svgĮxports the objects Triangle and Path to different files.(Note: there is an implicit file export at the end. This will export the object with the id MyTriangle with a purple background to the file triangle_purple.png and with a red background to the file triangle_red.png. inkscape -without-gui -actions="export-id:MyTriangle export-id-only export-background:purple export-filename:triangle_purple.png export-do export-background:red export-filename:triangle_red.png" my_file.svg.This allows one to do multiple exports on a single file. Export can be forced at any point with the export-do action. If only actions are used, either -without-gui or -batch-process must be used (due to our code structure, most verbs require the GUI to be present even if not used).Īll files on the command line will be opened, processed according to actions options, and then closed. (How?)Īll export options have matching actions (remove the '-' in front of the option and replace '=' with ':'). Use of export options and actions can be mixed. If used with file read from standard input (stdin), -export-filename can be omitted Via actions Export an SVG to PNG format and write it to standard output (stdout), then convert it to JPG format with ImageMagick's convert program: inkscape -export-type=png -export-filename=- my_file.svg | convert - filename.jpg.Read an SVG from standard input (stdin) and export it to PDF format: cat my_file.svg | inkscape -pipe -export-filename=my_file.pdf.This will produce two SVG files, one with just the triangle, the other with just the rectangle. Export more than one object to SVG files: inkscape -export-type="svg" -export-id="MyTriangle MyRectangle" -export-id-only my_file.svg CRASH: FIXME.This will produce two PNG files, one tightly wrapping the triangle, the other the rectangle. Export more than one object at a time to PNG files: inkscape -export-type="png" -export-id="MyTriangle MyRectangle" my_file.svg.This will produce a PNG with a file name my_file_MyTriangle.png which tightly wraps the object. Export one object from the file to a PNG, hiding all other objects: inkscape -export-type="png" -export-id="MyTriangle" -export-id-only my_file.svg.Objects that extend into the exported area will be shown. Export one object from the file to a PNG: inkscape -export-type="png" -export-id="MyTriangle" my_file.svg.This will produce a PNG with a name my_file.png ![]() Simple export of a PNG: inkscape -export-type="png" my_file.svg.Only one of -export-area, -export-area-page, -export-area-drawing, -export-use-hints will be used to determine the export area.If both -export-filename and -export-type are given, the file name extension must match the type.All files listed on the command line will be opened, processed according to export options. Use of export options will suppress the GUI. Query the geometry of all objects: inkscape -query-all.Find the x position of a set of objects: inkscape -query-id="MyTriangle,MySquare" -query-x my_file.svg.List of available actions (very long): inkscape -action-list. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |