Code

Added --export-area-canvas (-C).
[inkscape.git] / inkscape.pod
2 =head1 NAME
4 Inkscape - an SVG (Scalable Vector Graphics) editing program.
6 =head1 SYNOPSIS
8 C<inkscape [options] [filename ...]>
10 options:
12     -?, --help          
13         --usage       
14     -V, --version
16     -f, --file=FILENAME               
17     -s, --slideshow                   
19     -e, --export-png=FILENAME         
20     -a, --export-area=x0:y0:x1:y1     
21     -C, --export-area-canvas
22     -D, --export-area-drawing
23         --export-area-snap
24     -i, --export-id=ID     
25     -j, --export-id-only     
26     -t, --export-use-hints
27     -b, --export-background=COLOR     
28     -y, --export-background-opacity=VALUE     
29     -d, --export-dpi=DPI              
30     -w, --export-width=WIDTH          
31     -h, --export-height=HEIGHT        
33     -P, --export-ps=FILENAME
34     -E, --export-eps=FILENAME
35     -T, --export-text-to-path
36     -B, --export-bbox-page 
38     -l, --export-plain-svg=FILENAME             
40     -I, --query-id=ID     
41     -X, --query-x
42     -Y, --query-y
43     -W, --query-width
44     -H, --query-height
46     -x, --extension-directory
48     -p, --print=PRINTER
50     -g, --with-gui                    
51     -z, --without-gui                 
53         --vacuum-defs
55         --g-fatal-warnings
57 =head1 DESCRIPTION
59 B<Inkscape> is a GUI editor for B<Scalable Vector Graphics (SVG)> format
60 drawing files, with capabilities similar to B<Adobe Illustrator>,
61 B<CorelDraw>, B<Visio>, etc. Inkscape features include versatile
62 shapes, bezier paths, freehand drawing, multi-line text, text on path,
63 alpha blending, arbitrary affine transforms, gradient and pattern fills, node
64 editing, SVG-to-PNG export, grouping, layers, live clones, and more.  The interface is
65 designed to be comfortable and efficient for skilled users, while
66 remaining conformant to B<GNOME> standards so that users familiar with
67 other GNOME applications can learn its interface rapidly.
69 B<SVG> is a W3C standard XML format for 2D vector drawing. It allows
70 defining objects in the drawing using points, paths, and primitive
71 shapes.  Colors, fonts, stroke width, and so forth are specified as
72 `style' attributes to these objects.  The intent is that since SVG is a
73 standard, and since its files are text/xml, it will be
74 possible to use SVG files in a sizeable number of programs and for a
75 wide range of uses.
77 B<Inkscape> uses SVG as its native document format, and has the goal of
78 becoming the most fully compliant drawing program for SVG files
79 available in the Open Source community.
82 =head1 OPTIONS
84 =over 8
86 =item B<-?>, B<--help>
88 Show help message
90 =item B<-V>, B<--version>
92 Show Inkscape version and build date.
94 =item B<-a> I<x0:y0:x1:y1>, B<--export-area>=I<x0:y0:x1:y1>
96 In PNG export, set the exported area in SVG user units (anonymous length units normally used
97 in Inkscape SVG).  The default is to export the entire document canvas.  The point (0,0)
98 is the lower-left corner.
100 =item B<-C>, B<--export-area-canvas>
102 In PNG export, exported area is the entire canvas.
104 =item B<-D>, B<--export-area-drawing>
106 In PNG export, exported area is the entire drawing (not canvas), i.e. the bounding box
107 of all objects of the document. With this option, the exported image will
108 display just the visible objects of the document without margins or cropping. Can be
109 used in combination wtih --export-use-hints.
111 =item B<--export-area-snap>
113 Snap the export area outwards to the nearest integer SVG user unit (px) values. If you are using the 
114 default export resolution of 90dpi and your graphics are pixel-snapped to minimize antialiasing, this switch 
115 allows you to preserve this alignment even if you are exporting some object's bounding 
116 box (with --export-id or --export-area-drawing) which is itself not pixel-aligned.
118 =item B<-b> I<COLOR>, B<--export-background>=I<COLOR>
120 Background color of exported PNG.
121 This may be any SVG supported color string, for example "#ff007f" or "rgb(255, 0, 128)".
122 If not set,
123 then the page color set in Inkscape in the Document Options dialog will be used (stored in the pagecolor= attribute of sodipodi:namedview).
125 =item B<-d> I<DPI>, B<--export-dpi>=I<DPI>
127 The resolution used for bitmap export.
128 The default is 90, which corresponds to 1 SVG user unit 
129 (px, also called "user unit") exporting to 1 bitmap pixel.
130 This value overrides the DPI hint if used with --export-use-hints.
132 =item B<-e> I<FILENAME>, B<--export-png>=I<FILENAME>
134 Specify the filename for PNG export.
135 If it already exists, the file will be overwritten without asking.
137 =item B<-f> I<FILENAME>, B<--file>=I<FILENAME>
139 Open specified document(s).
140 Option string may be omitted, i.e. you can list the filenames without -f.
142 =item B<-g>, B<--with-gui>
144 Try to use the GUI (on Unix, use the X server even if $DISPLAY is not set).
146 =item B<-h> I<HEIGHT>, B<--export-height>=I<HEIGHT>
148 The height of generated bitmap in pixels.
149 This value overrides the --export-dpi setting (or the DPI hint if used with --export-use-hints). 
151 =item B<-i> I<ID>, B<--export-id>=I<ID>
153 The id attribute value of the object that you want to export from the document.
154 By default the exported area is the bounding box of the object. 
156 =item B<-j>, B<--export-id-only>
158 Only export the object whose id is given in --export-id. All other objects are hidden and won't 
159 show in export even if they overlay the exported object. Without --export-id, this option is ignored.
161 =item B<-l>, B<--export-plain-svg>=I<FILENAME>
163 Export document(s) to plain SVG format, without sodipodi: or inkscape: namespaces and without RDF metadata.
165 =item B<-l>, B<--extension-directory>
167 Lists the current extension directory that Inkscape is configured to use and
168 then exits.  This is used for external extension to use the same configuration
169 as the original Inkscape installation.
171 =item B<-p> I<PRINTER>, B<--print>=I<PRINTER>
173 Print document(s) to the specified printer using `lpr -P PRINTER'.
174 Alternatively, use `| COMMAND' to specify a different command to pipe to,
175 or use `> FILENAME' to write the PostScript output to a file instead of printing.
176 Remember to do appropriate quoting for your shell, e.g.
178 inkscape --print='| ps2pdf - mydoc.pdf' mydoc.svg
180 =item B<-s>, B<--slideshow>
182 Show given files one by one, switching to the next one by any key or mouse event.
184 =item B<-t>, B<--export-use-hints>
186 Use export filename and DPI hints stored in the exported object (only with --export-id).
187 These hints are set automatically when you export selection from within Inkscape.
188 So, for example, if you export a shape with id="path231" as /home/me/shape.png at 300 dpi from document.svg using Inkscape GUI, and save the document,
189 then later you will be able to reexport that shape to the same file with the same resolution simply with 
191 inkscape -i path231 -t document.svg
193 If you use --export-dpi, --export-width, or --export-height with this option,
194 then the DPI hint will be ignored and the value from the command line will be used.
195 If you use --export-png with this option,
196 then the filename hint will be ignored and the filename from the command line will be used. 
198 =item B<-w> I<WIDTH>, B<--export-width>=I<WIDTH>
200 The width of generated bitmap in pixels.
201 This value overrides the --export-dpi setting (or the DPI hint if used with --export-use-hints). 
203 =item B<-y> I<VALUE>, B<--export-background-opacity>=I<VALUE>
205 Opacity of the background of exported PNG.
206 This may be a value either between 0.0 and 1.0 (0.0 meaning full transparency, 1.0 full opacity)
207 or greater than 1 up to 255 (255 meaning full opacity).
208 If not set and the -b option is not used,
209 then the page opacity set in Inkscape in the Document Options dialog will be used (stored in the inkscape:pageopacity= attribute of sodipodi:namedview).
210 If not set but the -b option is used,
211 then the value of 255 (full opacity) will be used. 
213 =item B<-P> I<FILENAME>, B<--export-ps>=I<FILENAME>
215 Export document(s) to PostScript format.
217 =item B<-E> I<FILENAME>, B<--export-eps>=I<FILENAME>
219 Export document(s) to Encapsulated PostScript format.
221 =item B<-T>, B<--export-text-to-path>
223 Convert text objects to paths on export, where applicable (currently works with EPS only).
225 =item B<-B>, B<--export-bbox-page>
227 Export files with the bounding box set to the page size, where applicable (currently works with EPS only).
229 =item B<-I>, B<--query-id>
231 Set the ID of the object whose dimensions are queried. If not set, query options will 
232 return the dimensions of the drawing (i.e. all document objects), not the page or viewbox
234 =item B<-X>, B<--query-x>
236 Query the X coordinate of of the drawing or, if specified, of the object with --query-id. The returned value is in px (SVG user units). 
238 =item B<-Y>, B<--query-y>
240 Query the Y coordinate of of the drawing or, if specified, of the object with --query-id. The returned value is in px (SVG user units). 
242 =item B<-W>, B<--query-width>
244 Query the width of of the drawing or, if specified, of the object with --query-id. The returned value is in px (SVG user units). 
246 =item B<-H>, B<--query-height>
248 Query the height of of the drawing or, if specified, of the object with --query-id. The returned value is in px (SVG user units). 
250 =item B<--vacuum-defs>
252 Remove all unused items from the <lt>defs<gt> section of the SVG file.  If this
253 option is invoked in conjunction with --export-plain-svg, only the exported file
254 will be affected.  If it is used alone, the specified file will be modified in place.
256 =item B<-z>, B<--without-gui>
258 Do not open the GUI (on Unix, do not use X server); only process the files from console.
259 This is assumed for -p, -e, -l, and --vacuum-defs options. 
261 =item B<--g-fatal-warnings>
263 Part of the standard GTK option that are recognized.  This forces any GTK
264 warnings to cause Inkscape to abort.  This option is listed because it gets
265 used for debugging.
267 =item B<--usage>
269 Display a brief usage message.
271 =back
273 =head1 CONFIGURATION
275 The preferences.xml configuration file located in ~/.inkscape/ is used
276 to customize the application settings for the user.  
278 =over 8
280 =item B<interface> 
282 The B<interface> element(s) of the config file is used to set parameters
283 related to the GUI interface, such as the open/closed status of various
284 GUI elements, etc. 
286 =item B<group id="documents">
288 The documents group is used for containing the recent files list.  Each
289 document is listed with its uri (path) and name indicated.
291 =item B<group id="template">
293 The template group is used for storing parameters related to blank
294 documents. 
296 =item B<group id="tools">
298 The tools group is used for storing the user style preferences for
299 different event contexts (i.e., shapes, freehand or calligraphic stroke
300 properties, etc.).
302 =item B<group id="palette">
304 The palette group allows setting of dash styles.  This allows you to
305 define the stroke lengths for different kinds of dashes.
307 =item B<group id="dialogs">
309 The dialogs group allows persisting the position and width of each of
310 the dialogs in the application, so that they'll start up in the last
311 place the user had them at the next time the app is run.
313 =item B<group id="printing">
315 The printing group is for storing different printer settings.  Each
316 setting is identified with an id.  Properties include I<bitmap>
317 (true/false), I<resolution>, and I<destination>.
319 =item B<group id="options">
321 The options group allows persisting various user selected options
322 including I<nudgeddistance>, I<rotationstep>, I<cursortolerance>, and
323 I<dragtolerance>. 
325 =back
327 =head1 DIAGNOSTICS
329 The program returns zero on success or non-zero on failure.
331 A variety of error messages and warnings are printed to STDERR or
332 STDOUT.  If the program behaves erratically with a particular SVG file
333 or crashes, it is sometimes useful to look at this output for clues.
335 =head1 EXAMPLES
337 While obviously B<Inkscape> is primarily intended as a GUI application,
338 it can be used for doing SVG processing on the commandline as well.
340 Print an SVG file:
342     inkscape filename.svg -p '| lpr'
344 Export an SVG file into PNG with the default resolution of 90dpi (one SVG user unit translates to one bitmap pixel):
346     inkscape filename.svg --export-png=filename.png
348 Same, but force the PNG file to be 600x400 pixels:
350     inkscape filename.svg --export-png=filename.png -w600 -h400
352 Same, but export the drawing (bounding box of all objects), not the page:
354     inkscape filename.svg --export-png=filename.png --export-area-drawing
356 Export to PNG the object with id="text1555", using the output filename and 
357 the resolution that were used for that object last time when it was exported from the GUI:
359     inkscape filename.svg --export-id=text1555 --export-use-hints
361 Same, but use the default 90dpi resolution, specify the filename, 
362 and snap the exported area outwards to the nearest whole SVG user unit values 
363 (to preserve pixel-alignment of objects and thus minimize antialiasing):
365     inkscape filename.svg --export-id=text1555 --export-png=text.png --export-snap-area
367 Convert an Inkscape SVG document to plain SVG:  
369     inkscape filename1.svg --export-plain-svg=filename2.svg
371 Convert an SVG document to EPS, converting all texts to paths:
373     inkscape filename.svg --export-eps=filename.eps --export-text-to-path
375 Query the width of the object with id="text1555":
377     inkscape filename.svg --query-width --query-id text1555
380 =head1 ENVIRONMENT
382 B<DISPLAY> to get the default host and display number.
384 B<TMPDIR> to set the default path of the directory to use for temporary
385 files.  The directory must exist.
387 =head1 THEMES
389 To load different icons sets instead of the default
390 B<$PREFIX>/share/inkscape/icons/icons.svg file, the directory
391 B<$HOME>/.inkscape/icons/ is used.  Icons are loaded by name
392 (e.g. I<fill_none.svg>), or if not found, then from I<icons.svg>.  If the
393 icon is not loaded from either of those locations, it falls back to the
394 default system location.
396 The needed icons are loaded from SVG files by searching for the SVG id with
397 the matching icon name.  (For example, to load the "fill_none" icon from
398 a file, the bounding box seen for SVG id "fill_none" is rendered as the
399 icon, whether it comes from I<fill_none.svg> or I<icons.svg>.)
401 =head1 FILES
403 B<$HOME>/.inkscape/preferences.xml - The user's preference settings. 
405 B<$HOME>/.inkscape/extensions.xml - The filter programs to be used in
406 the application.
408 B<$HOME>/.inkscape/icons/{*,icons}.svg - Icons to overload for themes.
410 =head1 OTHER INFO
412 The canonical place to find B<Inkscape> info is at
413 http://www.inkscape.org/.  The website includes links to other relevant
414 documentation, tutorials, user manual, examples, mailing list archives,
415 the latest released version of the program, and more. 
417 =head1 SEE ALSO
419 gimp(1), autotrace, potrace, frontline, ill2svg, rsvg(1), xfig(1), sodipodi,
420 karbon14, dia(1X), batik.
422 SVG compliance test suite:  http://www.w3.org/Graphics/SVG/Test/
424 SVG validator:  http://jiggles.w3.org/svgvalidator/
426 I<Scalable Vector Graphics (SVG) 1.1 Specification>
427 I<W3C Recommendation 14 January 2003>
428 L<http://www.w3.org/TR/SVG11/>
430 I<Scalable Vector Graphics (SVG) 1.2 Specification>
431 I<W3C Working Draft 13 November 2003>
432 L<http://www.w3.org/TR/SVG12/>
434 I<SVG 1.1/1.2/2.0 Requirements>
435 I<W3C Working Draft 22 April 2002>
436 L<http://www.w3.org/TR/SVG2Reqs/>
438 I<Document Object Model (DOM): Level 2 Core>
439 I<Arnaud Le Hors et al editors, W3C>
440 L<http://www.w3.org/TR/DOM-Level-2-Core/>
443 =head1 GUI NOTES
445 To learn Inkscape's GUI operation, read the tutorials in Help > Tutorials.
447 Inkscape can import (File > Import) most bitmap formats (PNG, BMP, JPG, XPM, GIF etc.),
448 plain text (requires Perl), and AI format (Adobe Illustrator documents, versions up to 7 only;
449 requires Perl). 
451 Inkscape exports 32-bit PNG images (File > Export) as well as AI, PS, EPS, PDF (requires
452 Ghostscript), DXF and several other formats via File > Save as.
454 Inkscape can use the pressure and tilt of a graphic tablet pen for width and angle of
455 the Calligraphic tool.
457 Inkscape includes a GUI front-end to the Potrace bitmap tracing engine
458 (http://potrace.sf.net) which is embedded into Inkscape.
460 Inkscape can use external scripts (stdin-to-stdout filters) that are represented by
461 commands in the Effects menu. A script can have a GUI dialog for setting various
462 parameters and can get the IDs of the selected objects on which to act via the command
463 line. Inkscape comes with an assortment of effects written in Python, mostly for path
464 manipulation.
466 =head1 KEYBINDINGS
468 To get a complete list of keyboard and mouse shortcuts, view doc/keys.html, or use the Keys and Mouse command in Help menu from the GUI to see an SVG chart.
470 =head1 BUGS
472 Many bugs are known; please refer to the website (inkscape.org) for reviewing the reported ones and to
473 report newly found issues.  See also the Known Issues section in the Release Notes for
474 your version (file `NEWS').
476 =head1 AUTHORS
478 This codebase owes its existance to a large number of contributors
479 throughout its various incarnations.  The following list is certainly
480 incomplete, but serves to recognize the many shoulders on which this
481 application sits:
483 [% INCLUDE "AUTHORS" %]
485 This man page was put together by Bryce Harrington
486 E<lt>brycehar@bryceharrington.comE<gt>.
488 =head1 HISTORY
490 The codebase that would become Inkscape began life in 1999 as the
491 program Gill, the GNOME Illustrator application, created by Raph
492 Levien.  The stated objective for Gill was to eventually support all of
493 SVG.  Raph implemented the PostScript bezier imaging model, including
494 stroking and filling, line cap style, line join style, text, etc.  
495 Raph's Gill page is at http://www.levien.com/svg/.  Work on Gill appears
496 to have slowed or ceased in 2000.
498 The next incarnation of the codebase was to become the highly popular
499 program Sodipodi, led by Lauris Kaplinski.  The codebase was turned
500 into a powerful illustration program over the course of several
501 year's work, adding several new features, multi-lingual support, porting
502 to Windows and other operating systems, and eliminating dependencies.
504 Inkscape was formed in 2003 by four active Sodipodi developers, Bryce
505 Harrington, MenTaLguY, Nathan Hurst, and Ted Gould, wanting to take a
506 different direction with the codebase in terms of focus on
507 SVG compliance, interface look-and-feel, and a desire to open
508 development opportunities to more participants.  
510 =head1 COPYRIGHT AND LICENSE
512 B<Copyright (C)> 1999-2005 by Authors.  
514 B<Inkscape> is free software; you can redistribute it and/or modify it
515 under the terms of the GPL.  
518 =for comment
519 $Date$