Inkscape is capable of exporting drawings to several types of vettore and bitmap graphics files. Exporting methods are divided between exporting PNG (Portable Network Graphics) files and exporting to all other file formats. The PNG graphics standard is a patent unencumbered standard that is supported natively by all major web browsers and graphics programs.
Suggerimento | |
---|---|
You can set the page size to match the quadro delimitatore of a selection by clicking on the Fit page to selection button in the Proprietŕ del Documento dialog. This is useful for setting the page size after creating an illustration. |
Exporting a PNG file is done through the Esporta Bitmap dialog ( → (Shift+Ctrl+E)).
Nota | |
---|---|
This dialog ONLY exports PNG files, regardless of what file extension you use. |
At the top of the dialog are four buttons that give an initial setting as to what area of the drawing should be exported (except for the Custom button, which does nothing). Once given an initial setting, the area can be adjusted.
Page: Export the area enclosed by the page. The default filename is the SVG filename with the «svg» extension replaced by «png».
Drawing: Export all objects in drawing (including those outside the page). The initial export area is the quadro delimitatore of all the objects. The default filename is the SVG filename with the «svg» extension replaced by «png».
Selection: Export the region enclosed by the quadro delimitatore surrounding the selected objects. The default filename is the internal name of the last object selected.
Custom: Export the area defined in the entry boxes.
The area to be exported can be modified by the entry boxes in the Export area part of the dialog. The units can be changed in the Units pull-down menu.
In the Bitmap size section of the dialog, the size of the exported bitmap can be defined. Inkscape uses a default conversion of 90 dpi. Only the Width and width dpi can be changed; the Height will scale to preserve the height to width aspect ratio of the drawing.
In the Filename section, a filename can be entered or one can open a dialog to browse for a filename.
New in v0.46:
There are two options at the bottom of the dialog. The first one, Batch export n selected objects, is available if more than one object is selected. If checked, each of the selected objects will be exported into its own file. The name of the file will be the id name for the object (see Editor XML dialog) unless an object has been previously saved with a specific filename, in which case the previous filename will be used (the filename is stored under the export-filename attribute). The resolution will be 90 dpi unless previously saved with a different dpi. Note: Batch export will overwrite files without warning.
The second option, Hide all except selected, is available if one or more objects are selected. If checked all unselected objects will be hidden during export.
The following figure shows a test file exported to a PNG. The file includes basic shapes, text, and a linear Gradiente.
Suggerimento | |
---|---|
To slice a drawing into pieces for use on the web, one can create an array of hidden rectangles (no Contorno or Riempimento) in a separate «export» Livello. Save each rectangle one time to define the export filename. Then when it is time to export the drawing, go to the «export» layer, use the command → (Ctrl+A) to select all the rectangles in the Livello, then do a batch export. |
Suggerimento | |
---|---|
The default window size for the dialog may be too narrow to view the output filename including the directory path. Just widen the window to see the entire path. |
Avvertimento | |
---|---|
Inkscape has rendering problems when two objects touch each other along a common border. This is often seen when a Motivo is used for a Riempimento. Firefox, Opera, and Batik do not have this problem. Batik can be used to produce a high-quality PNG, JPEG, or TIFF file. |
Exporting to a type other than a PNG is done through the Salva come dialog ( → (Shift+Ctrl+S)). The file type is chosen from a pull-down menu. Additional programs, listed below, are required for many of the file exports.
Suggerimento | |
---|---|
If exporting fails to work, check the
|
Nota | |
---|---|
Transparency (the ability to partially see one object through another object) is lost in several of the export types. Text may also have to be converted to paths for satisfactory results in some cases. |
File types supported (a * indicates the author has not tested the file export):
.ai (Adobe Illustrator). Requires ghostscript to be installed. The Adobe Illustrator (version 8.0) file format is a modified version of the EPS level 2 format. Files saved in this format can be displayed in many PostScript viewers (you may have to change the «.ai» file tag to «.ps»). Bitmaps are not exported and trasparenza is lost.
Suggerimento | |
---|---|
Recent versions of Illustrator can import SVG files directly. This will most likely give better results than exporting to an .ai file from Inkscape. |
There is one option that determines if the text is converted to a path or is left as a PostScript text object. There is no guarantee with the latter choice that the printing will be done with the correct font if fonts are not embedded in the file.
.dxf (AutoCAD). All attributes lost. Requires Pstoedit to be installed.
Two options allow text to be saved as a path or embedded (Type 1 only). The latter option seems to be ignored.
A simplified form of DXF export for desktop cutting plotters is also supported (labeled «Desktop Cutting Plotter»). The form supports cutters from Wishblade and Craftrobo.
New in v0.45.
.emf (Enhanced Meta File)*. Only works with Windows. Only exports Contorni and Riempimenti with solid colors.
.eps, .epsi (Encapsulated PostScript, Encapsulated PostScript Interchange). Transparency is lost.
There are three options. The first determines if the BoundingBox in the EPS file is set to the quadro delimitatore of the objects in the drawing or to the dimensions of the page. The second determines if the text is converted to a path or is left as a PostScript text object. The latter allows easy editing of the text in the EPS file but if the font is not embedded in the file, there is no assurance that the printing will be done with the correct font. The third allows embedding fonts in the file. This only works with Type 1 fonts.
.gpl (Gimp Palette).
Saves a list of colors used in the drawing to a Gimp Palette
file. The file can then be moved to the Inkscape palette
directory (share/inkscape/palettes/
) and the palette can be
selected in the Palette bar or the Campioni dialog.
Requires PyXML module.
.odg (Open Document Graphic). Limited support, better support planned.[9] Currently only export of text, shapes, and solid fill and strokes is supported.
Updated for v0.46.
.pdf (PDF). As of v0.46, a Cairo-based exporter has replaced the old PDF exporter. It is recommended that at least cairo 1.5.2 be used. Patterns, clipping, and masking are not supported. The methods to produce PDF found under the Stampa dialog may produce better output.
Avvertimento | |
---|---|
Some versions of Evince, a popular Linux Postscript and PDF viewer, do not show gradients with trasparenza; use Acroread instead. |
Nota | |
---|---|
Export to PDF prior to v0.46 produced uncompressed PDF files (which is legal according to the standard). Some operating systems and display software may complain. |
.pov (PovRay).
Saves shapes and text, with color and
transparency, as prism objects. Stroke is
not saved. To render a drawing, a camera with lights, etc. must
be defined. See
share/inkscape/examples/istest.pov
for an
example.
Updated for v0.46 (Cairo method).
.ps (PostScript). Two separate methods are provided: The older built-in method (labeled «PostScript») and the newer Cairo-based method (labeled «PostScript via Cairo»). The methods to produce PostScript found under the Stampa dialog may produce better output.
PostScript: Transparency is lost. Clipping, masking, and patterns are not supported.
There are two options. The first determines if the text is converted to a path or is left as a PostScript text object. With the latter choice, the text is easily editable within the PostScript file. However, there is no guarantee that the printing will be done with the correct fonts if the fonts are not embedded in the PostScript file. The second option allows fonts to be embedded. This only works with Type 1 fonts.
PostScript via Cairo: Patterns and clipping rendered incorrectly. Problems with dashed lines. Masking not supported. Relies on bitmap fallbacks more often than PDF Cairo output.
Options exist to select the PostScript level (either 2 or 3), if text should be converted to paths, if blurs made with the Sfocatura Gaussiana filter should be converted to bitmaps, and the preferred resolution of fallback bitmaps. Not converting blurs to bitmaps may yield an empty file.
.tex (LaTeX with PSTricks macros). Requires the PSTricks package to be installed, which is normally included with the LaTeX package.
Here is an example of a LaTeX file to use with Inkscapes tex output
saved in the file my_inkscape_test.tex
.
\documentclass[12pt]{article} \usepackage{pstricks} \begin{document} Test of PSTricks with Inkscape. \input{FileExportTest.tex} \end{document}
Suggerimento | |
---|---|
If you need equations in your figures, there are two methods available. The first is to use the Latex Formula extension. Alternatively, you can use the psfrag LaTeX package. To use the latter, put a place holders for your equation in a text box. Then export as an EPS file (without converting the text to a path or using manual kerning!). The psfrag package can then be used to replace the placeholder with a latex expression. Putting text on a diagonal is possible. \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{psfrag} \begin{document} \psfrag{Export Test}{PSFrag: $\sqrt{x^2+y^2}$} \includegraphics{FileExportTest2.eps} \end{document} |
Inkscape can also be used to design LaTeX presentation styles. See Latex Presentation Designer.
.svg, .svgz (SVG, SVG compressed). Two options are available: Plain SVG and SVG with Inkscape extensions (for storage of Inkscape meta data). In theory, any program that reads SVG files should ignore the Inkscape extensions.
.xcf (Gimp). All top-level layers and objects are exported as separate layers in the PNG format and then inserted as layers into the Gimp native XCF format. Requires Python, PyXML, and Gimp 2.2 or higher. Both Gimp and Inkscape (v0.44 or greater) must be in the executable path. This export is not implemented on Windows.
New in v0.46.
.xaml (Microsoft Application eXtensible Markup Language)*.
.zip (Compressed Inkscape SVG with Media). This option will save the drawing as an Inkscape SVG file and then package that along with all included (linked) graphics files as a zip package. The resulting file cannot be read directly by Inkscape. However, when the file is uncompressed, all the included graphics should be placed where Inkscape can find them when the SVG file is opened.
[9] The book discloses forward-looking statements on Inkscape features. These forward-looking statements are based on many assumptions including developer availability and customer demand. While the author believes that these forward-looking statements to be reasonable, the reader should not construe these statements to be a contract of any kind.
© 2005-2008 Tavmjong Bah. | Get the book. |