1PSTOEDIT(1) Conversion Tools PSTOEDIT(1)
2
3
4
6 pstoedit - a tool converting PostScript and PDF files into various vec‐
7 tor graphic formats
8
10 FROM THE COMMAND SHELL
11 pstoedit [-v -help]
12
13 pstoedit
14
15 [-include name of a PostScript file to be included] [-df font name]
16 [-nomaptoisolatin1] [-dis] [-nq] [-nc] [-nsp] [-mergelines] [-fille‐
17 drecttostroke] [-mergetext] [-dt] [-adt] [-ndt] [-correctdefinefont]
18 [-pti] [-pta] [-xscale number] [-yscale number] [-xshift number]
19 [-yshift number] [-centered] [-split] [-v] [-usebbfrominput] [-ssp]
20 [-uchar character] [-nb] [-page page number] [-flat flatness factor]
21 [-sclip] [-ups] [-rgb] [-noclip] [-t2fontsast1] [-keep] [-gstest]
22 [-nfr] [-glyphs] [-rotate angle (0-360)] [-fontmap name of font map
23 file for pstoedit] [-pagesize page format] [-help] [-bo] [-psarg argu‐
24 ment string] -f "format[:options]" [-gsregbase GhostScript base reg‐
25 istry path] [ inputfile [outputfile] ]
26
27 FROM GSVIEW
28 Pstoedit can be called from within gsview via "Edit | Convert to vector
29 format"
30
31 FROM PROGRAMS THAT SUPPORT THE ALDUS GRAPHIC IMPORT FILTER INTERFACE
32 pstoedit can also be used as PostScript and PDF graphic import filter
33 for several programs including MS-Office, PaintShop-Pro and PhotoLine.
34 See http://www.pstoedit.net/importps/ for more details.
35
37 RELEASE LEVEL
38 This manpage documents release 3.45 of pstoedit.
39
40 USE
41 pstoedit converts PostScript and PDF files to various vector graphic
42 formats. The resulting files can be edited or imported into various
43 drawing packages. Type
44
45 pstoedit -help
46
47 to get a list of supported output formats. Pstoedit comes with a large
48 set of format drivers integrated in the binary. Additional drivers can
49 be installed as plugins and are available via
50 http://www.pstoedit.net/plugins/. Just copy the plugins to the same
51 directory where the pstoedit binary is installed or - under Unix like
52 systems only - alternatively into the lib directory parallel to the bin
53 directory where pstoedit is installed.
54
55 However, unless you also get a license key for the plugins, the addi‐
56 tional drivers will slightly distort the resulting graphics. See the
57 documentation provided with the plugins for further details.
58
59 PRINCIPLE OF CONVERSION
60 pstoedit works by redefining the some basic painting operators of Post‐
61 Script, e.g. stroke or show (bitmaps drawn by the image operator are
62 not supported by all output formats.) After redefining these operators,
63 the PostScript or PDF file that needs to be converted is processed by a
64 PostScript interpreter, e.g., Ghostscript (gs(1)). You normally need
65 to have a PostScript interpreter installed in order to use this pro‐
66 gram. However, you can perform some "back end only" processing of files
67 following the conventions of the pstoedit intermediate formate by spec‐
68 ifying the -bo option. See "Available formats and their specific
69 options" below.
70
71 The output that is written by the interpreter due to the redefinition
72 of the drawing operators is a sort of 'flat' PostScript file that con‐
73 tains only simple operations like moveto, lineto, show, etc. You can
74 look at this file using the -f debug option.
75
76 This output is read by end-processing functions of pstoedit and trig‐
77 gers the drawing functions in the selected output format driver some‐
78 time called also "backend".
79
80 NOTES
81 If you want to process PDF files directly, your PostScript interpreter
82 must provide this feature, as does Ghostscript. Aladdin Ghostscript is
83 recommended for processing PDF and PostScript files.
84
86 GENERAL OPTIONS
87 [-include name of a PostScript file to be included]
88 This options allows to specify an additional PostScript file
89 that will be executed just before the normal input is read. This
90 is helpful for including specific page settings or for disabling
91 potentially unsafe PostScript operators, e.g., file, renamefile,
92 or deletefile.
93
94 [-xscale number]
95 scale by a factor in x-direction
96
97 [-yscale number]
98 scale by a factor in y-direction
99
100 [-xshift number]
101 shift image in x-direction
102
103 [-yshift number]
104 shift image in y-direction
105
106 [-centered]
107 center image before scaling or shifting
108
109 [-split]
110 Create a new file for each page of the input. For this the out‐
111 put filename must contain a %d which is replaced with the cur‐
112 rent page number. This option is automatically switched on for
113 output formats that don't support multiple pages within one
114 file, e.g. fig or gnuplot.
115
116 [-usebbfrominput]
117 If specified, pstoedit uses the BoundingBox as is (hopefully)
118 found in the input file instead of one that is calculated by its
119 own.
120
121 [-page page number]
122 Select a single page from a multi page PostScript or PDF file.
123
124 [-rgb]
125 Since version 3.30 pstoedit uses the CMYK colors internally.
126 The -rgb option turns on the old behavior to use RGB values.
127
128 [-noclip]
129 don't use clipping (relevant only if output format supports
130 clipping at all)
131
132 [-rotate angle (0-360)]
133 Rotage image by angle.
134
135 [-pagesize page format]
136 set page size for output medium. This option sets the page
137 size for the output medium. Currently this is just used by the
138 libplot output format driver, but might be used by other output
139 format drivers in future. The page size is specified in terms of
140 the usual page size names, e.g. letter or a4.
141
142 [-help]
143 show the help information
144
145 [-bo]
146 You can run backend processing only (without the PostScript
147 interpreter frontend) by first running pstoedit -f dump infile
148 dumpfile and then running pstoedit -f format -bo dumpfile out‐
149 file.
150
151 [-psarg argument string]
152 The string given with this option is passed directly to Ghost‐
153 script when Ghostscript is called to process the PostScript file
154 for pstoedit. For example: -psarg "-r300x300". This causes the
155 resolution to be changed to 300x300 dpi. (With older versions of
156 GhostScript, changing the resolution this way has an effect only
157 if the -dis option is given.) You can switch Ghostscript into
158 PostScript Level 1 only mode by -psarg "level1.ps". This can be
159 useful for example if the PostScript file to be converted uses
160 some Level 2 specific custom color models that are not supported
161 by pstoedit. However, this requires that the PostScript program
162 checks for the PostScript level supported by the interpreter and
163 "acts" accordingly. If you want to pass multiple options to
164 Ghostscript you can use multiple -psarg options -psarg opt1
165 -psarg opt2 -psarg opt2. See the GhostScript manual for other
166 possible options.
167
168 -f "format[:options]"
169 target output format recognized by pstoedit. Since other for‐
170 mat drivers can be loaded dynamically, type pstoedit -help to
171 get a full list of formats. See "Available formats and their
172 specific options " below for an explanation of the [:options] to
173 -f format. If the format option is not given, pstoedit tries to
174 guess the target format from the suffix of the output filename.
175 However, in a lot of cases, this is not a unique mapping and
176 hence pstoedit demands the -f option.
177
178 [-gsregbase GhostScript base registry path]
179 registry path to use as a base path when searching GhostScript
180 interpreter This option provides means to specify a registry key
181 under HKLM/Software where to search for GS interpreter key, ver‐
182 sion and GS_DLL / GS_LIB values. Example: "-gsregbase MyCompany"
183 means that HKLM/Software/MyCompany/GPL GhostScript would be
184 searched instead of HKLM/Software/GPL GhostScript.
185
186 TEXT AND FONT HANDLING RELATED OPTIONS
187 [-df font name]
188 Sometimes fonts embedded in a PostScript program do not have a
189 fontname. For example, this happens in PostScript files gener‐
190 ated by dvips(1). In such a case pstoedit uses a replacement
191 font. The default for this is Courier. Another font can be spec‐
192 ified using the -df option. -df Helvetica causes all unnamed
193 fonts to be replaced by Helvetica.
194
195 [-nomaptoisolatin1]
196 Normally pstoedit maps all character codes to the ones defined
197 by the ISO-Latin1 encoding. If you specify -nomaptoisolatin1
198 then the encoding from the input PostScript is passed unchanged
199 to the output. This may result in strange text output but on the
200 other hand may be the only way to get some fonts converted
201 appropriately. Try what fits best to your concrete case.
202
203 [-dt]
204 Draw text - Text is drawn as polygons. This might produce a
205 large output file. This option is automatically switched on if
206 the selected output format does not support text, e.g. gnu‐
207 plot(1).
208
209 [-adt]
210 Automatic Draw text - This option turns on the -dt option
211 selectively for fonts that seem to be no normal text fonts, e.g.
212 Symbol..
213
214 [-ndt]
215 Never Draw text - fully disable the heuristics used by pstoedit
216 to decide when to "draw" text instead of showing it as text.
217 This may produce incorrect results, but in some cases it might
218 nevertheless be useful. "Use at own risk".
219
220 [-correctdefinefont]
221 Some PostScript files, e.g. such as generated by ChemDraw, use
222 the PostScript definefont operator in way that is incompatible
223 with pstoedit's assumptions. The new font is defined by copying
224 an old font without changing the FontName of the new font. When
225 this option is applied, some "patches" are done after a define‐
226 font in order to make it again compatible with pstoedit's
227 assumptions. This option is not enabled per default, since it
228 may break other PostScript file. It is tested only with ChemDraw
229 generated files.
230
231 [-pti]
232 Precision text - Normally a text string is drawn as it occurs
233 in the input file. However, in some situations, this might pro‐
234 duce wrongly positioned characters. This is due to limitiations
235 in most output formats of pstoedit. They cannot represent text
236 with arbitray inter-letter spacing which is easily possible in
237 PDF and PostScript. With -pta, each character of a text string
238 is placed separately. With -pti, this is done only in cases when
239 there is a non zero inter-letter spacing. The downside of "pre‐
240 cision text" is a bigger file size and hard to edit text.
241
242 [-pta]
243 see -pti
244
245 [-uchar character]
246 Sometimes pstoedit cannot map a character from the encoding
247 used by the PostScript file to the font encoding of the target
248 format. In this case pstoedit replaces the input character by a
249 special character in order to show all the places that couldn't
250 be mapped correctly. The default for this is a "#". Using the
251 -uchar option it is possible to specify another character to be
252 used instead. If you want to use a space, use -uchar " ".
253
254 [-t2fontsast1]
255 Handle type 2 fonts same as type 1. Type 2 fonts sometimes
256 occur as embedded fonts within PDF files. In the default mode,
257 text using such fonts is drawn as polygons since pstoedit
258 assumes that such a font is not available on the users machine.
259 If this option is set, pstoedit assumes that the internal encod‐
260 ing follows the same as for a standard font and generates normal
261 text output. This assumption may not be true in all cases. But
262 it is nearly impossible for pstoedit to verify this assumption -
263 it would have to do a sort of OCR.
264
265 [-nfr]
266 In normal mode pstoedit replaces bitmap fonts with a font as
267 defined by the -df option. This is done, because most output
268 formats can't handle such fonts. This behavior can be switched
269 off using the -nfr option but then it strongly depends on the
270 application reading the the generated file whether the file is
271 usable and correctly interpreted or not. Any problems are then
272 out of control of pstoedit.
273
274 [-glyphs]
275 pass glyph names to the output format driver. So far no output
276 format driver really uses the glyph names, so this does not have
277 any effect at the moment. It is a preparation for future work.
278
279 [-fontmap name of font map file for pstoedit]
280 The font map is a simple text file containing lines in the fol‐
281 lowing format:
282
283 document_font_name target_font_name
284 Lines beginning with % are considerd comments
285 If a font name contains spaces, use the "font name with spaces" nota‐
286 tion.
287
288 Each font name found in the document is checked against this mapping
289 and if there is a corresponding entry, the new name is used for the
290 output.
291
292 If the -fontmap option is not specified, pstoedit automatically looks
293 for the file drivername.fmp in the installation directory and uses that
294 file as a default fontmap file if available. The installation directory
295 is:
296
297 * Windows: The same directory where the pstoedit executable
298 is located
299
300 * Unix:
301 <The directory where the pstoedit executably is located>
302 /../lib/
303
304 The mpost.fmp in the misc directory of the pstoedit distibution is a
305 sample map file with mappings from over 5000 PostScript font names to
306 their TeXequivalents. This is useful because MetaPost is frequently
307 used with TeX/LaTeX and those programs don't use standard font names.
308 This file and the MetaPost output format driver are provided by Scott
309 Pakin (pakin_AT_cs.uiuc.edu). Another example is wemf.fmp to be used
310 under Windows. See the misc directory of the pstoedit source distribu‐
311 tion.
312
313 DEBUG OPTIONS
314 [-dis]
315 Open a display during processing by Ghostscript. Some files
316 only work correctly this way.
317
318 [-nq]
319 No exit from the PostScript interpreter. Normally Ghostscript
320 exits after processing the pstoedit input-file. For debugging it
321 can be useful to avoid this. If you do, you will have to type
322 quit at the GS> prompt to exit from Ghostscript.
323
324 [-v]
325 Switch on verbose mode. Some additional information is shown
326 during processing.
327
328 [-nb]
329 Since version 3.10 pstoedit uses the -dDELAYBIND option when
330 calling GhostScript. Previously the -dNOBIND option was used
331 instead but that sometimes caused problems if a user's Post‐
332 Script file overloaded standard PostScript operator with totally
333 new semantic, e.g. lt for lineto instead of the standard meaning
334 of "less than". Using -nb the old style can be activated again
335 in case the -dDELAYBIND gives different results as before. In
336 such a case please also contact the author.
337
338 [-ups]
339 write text as plain string instead of hex string in intermedi‐
340 ate format - normally useful for trouble shooting and debugging
341 only.
342
343 [-keep]
344 keep the intermediate files produced by pstoedit - for debug
345 purposes only
346
347 [-gstest]
348 perform a basic test for the interworking with GhostScript
349
350 DRAWING RELATED OPTIONS
351 [-nc]
352 no curves. Normally pstoedit tries to keep curves from the
353 input and transfers them to the output if the output format sup‐
354 ports curves. If the output format does not support curves, then
355 pstoedit replaces curves by a series of lines (see also -flat
356 option). However, in some cases the user might wish to have this
357 behavior also for output formats that originally support curves.
358 This can be forced via the -nc option.
359
360 [-nsp]
361 normally subpathes are used if the output format support them.
362 This option turns off subpathes.
363
364 [-mergelines]
365 Some output formats permit the representation of filled poly‐
366 gons with edges that are in a different color than the fill
367 color. Since PostScript does not support this by the standard
368 drawing primitives directly, drawing programs typically generate
369 two objects (the outline and the filled polygon) into the Post‐
370 Script output. pstoedit is able to recombine these, if they fol‐
371 low each other directly and you specify -mergelines. However,
372 this merging is not supported by all output formats due to
373 restrictions in the target format.
374
375 [-filledrecttostroke]
376 Rectangles filled with a solid color can be converted to a
377 stroked line with a width that corresponds to the width of the
378 rectangle. This is of primary interest for output formats which
379 do not support filled polygons at all. But it is restricted to
380 rectangles only, i.e. it is not supported for general polygons
381
382 [-mergetext]
383 In order to produce nice looking text output, programs produc‐
384 ing PostScript files often split words into smaller pieces which
385 are then placed individually on adjacent positions. However,
386 such split text is hard to edit later on and hence it is some‐
387 time better to recombine these pieces again to form a word (or
388 even sequence of words). For this pstoedit implements some
389 heuristics about what text pieces are to be considered parts of
390 a split word. This is based on the geometrical proximity of the
391 different parts and seems to work quite well so far. But there
392 are certainly cases where this simple heuristic fails. So please
393 check the results carefully.
394
395 [-ssp]
396 simulate sub paths. Several output formats don't support Post‐
397 Script pathes containing sub pathes, i.e. pathes with intermedi‐
398 ate movetos. In the normal case, each subpath is treated as an
399 independent path for such output formats. This can lead to bad
400 looking results. The most common case where this happens is if
401 you use the -dt option and show some text with letters like e,
402 o, or b, i.e. letter that have a "hole". When the -ssp option is
403 set, pstoedit tries to eliminate these problems. However, this
404 option is CPU time intensive!
405
406 [-flat flatness factor]
407 If the output format does not support curves in the way Post‐
408 Script does or if the -nc option is specified, all curves are
409 approximated by lines. Using the -flat option one can control
410 this approximation. This parameter is directly converted to a
411 PostScript setflat command. Higher numbers, e.g. 10 give
412 rougher, lower numbers, e.g. 0.1 finer approximations.
413
414 [-sclip]
415 simulate clipping. Most output formats of pstoedit don't have
416 native support for clipping. For that pstoedit offers an option
417 to perform the clipping of the graphics directly without passing
418 the clippath to the output driver. However, this results in
419 curves being replaced by a lot of line segments and thus larger
420 output files. So use this option only if your output looks dif‐
421 ferent from the input due to clipping. In addition, this "simu‐
422 lated clipping" is not exactly the same as defined in Post‐
423 Script. There might be lines drawn at the double size. Also
424 clipping of text is not supported unless you also use the -dt
425 option.
426
427 INPUT AND OUTFILE FILE ARGUMENTS
428 [ inputfile [outputfile] ]
429
430 If neither an input nor an output file is given as argument, pstoedit
431 works as filter reading from standard input and writing to standard
432 output. The special filename "-" can also be used. It represents stan‐
433 dard input if it is the first on the command line and standard output
434 if it is the second. So "pstoedit - output.xxx" reads from standard
435 input and writes to output.xxx
436
438 pstoedit allows passing individual options to a output format driver.
439 This is done by appending all options to the format specified after the
440 -f option. The format specifier and its options must be separated by a
441 colon (:). If more than one option needs to be passed to the output
442 format driver, the whole argument to -f must be enclosed within dou‐
443 ble-quote characters, thus:
444
445 -f "format[:option option ...]"
446
447 To see which options are supported by a specific format, type: pstoedit
448 -f format:-help
449
450 The following description of the different formats supported by
451 pstoedit is extracted from the source code of the individual drivers.
452
453 psf - Flattened PostScript (no curves)
454 No driver specific options
455
456 ps - Simplified PostScript with curves
457 No driver specific options
458
459 debug - for test purposes
460 No driver specific options
461
462 dump - for test purposes (same as debug)
463 No driver specific options
464
465 gs - any device that GhostScript provides - use gs:format, e.g. gs:pdfwrite
466 No driver specific options
467
468 ps2ai - Adobe Illustrator via ps2ai.ps of GhostScript
469 No driver specific options
470
471 gmfa - ASCII GNU metafile
472 [plotformat string]
473 plotutil format to generate
474
475 gmfb - binary GNU metafile
476 [plotformat string]
477 plotutil format to generate
478
479 plot - GNU libplot output types, e.g. plot:type X
480 [plotformat string]
481 plotutil format to generate
482
483 plot-cgm - cgm via GNU libplot
484 [plotformat string]
485 plotutil format to generate
486
487 plot-ai - ai via GNU libplot
488 [plotformat string]
489 plotutil format to generate
490
491 plot-svg - svg via GNU libplot
492 [plotformat string]
493 plotutil format to generate
494
495 plot-ps - ps via GNU libplot
496 [plotformat string]
497 plotutil format to generate
498
499 plot-fig - fig via GNU libplot
500 [plotformat string]
501 plotutil format to generate
502
503 plot-pcl - pcl via GNU libplot
504 [plotformat string]
505 plotutil format to generate
506
507 plot-hpgl - hpgl via GNU libplot
508 [plotformat string]
509 plotutil format to generate
510
511 plot-tek - tek via GNU libplot
512 [plotformat string]
513 plotutil format to generate
514
515 magick - MAGICK driver
516 This driver uses the C++ API of ImageMagick or GraphicsMagick to
517 finally produce different output formats. The output format is deter‐
518 mined automatically by Image/GraphicsMagick based on the suffix of the
519 output filename. So an output file test.png will force the creation of
520 an image in PNG format.
521
522 No driver specific options
523
524 swf - SWF driver:
525 [-cubic]
526 cubic ???
527
528 [-trace]
529 trace ???
530
531 svg - scalable vector graphics
532 [-localdtd]
533 use local DTD
534
535 [-standalone]
536 create stand-alone type svg
537
538 [-withdtd]
539 write DTD
540
541 [-withgrouping]
542 write also ordinary save/restores as SVG group
543
544 [-nogroupedpath]
545 do not write a group around pathes
546
547 [-noviewbox]
548 don't write a view box
549
550 [-withnamespace]
551 write xmlns declaration into output file
552
553 [-texmode]
554 TeX Mode
555
556 [-imagetofile]
557 write raster images to separate files instead of embedding them
558
559 [-notextrendering]
560 do not write textrendering attribute
561
562 [-border number]
563 additional border to draw around bare bounding box (in percent
564 of width and height)
565
566 cgmb1 - CGM binary Format (V1)
567 No driver specific options
568
569 cgmb - CGM binary Format (V3)
570 No driver specific options
571
572 cgmt - CGM textual Format
573 No driver specific options
574
575 mif - (Frame)Maker Intermediate Format
576 [-nopage]
577 do not add a separate Page entry
578
579 rtf - RTF Format
580 No driver specific options
581
582 wemf - Wogls version of EMF
583 [-df]
584 write info about font processing
585
586 [-dumpfontmap]
587 write info about font mapping
588
589 [-size:psbbox]
590 use the bounding box as calculated by the PostScript frontent
591 as size
592
593 [-size:fullpage]
594 set the size to the size of a full page
595
596 [-size:automatic]
597 let windows calculate the bounding box (default)
598
599 [-keepimages]
600 debug option - keep the embedded bitmaps as external files
601
602 [-useoldpolydraw]
603 do not use Windows PolyDraw but an emulation of it - sometimes
604 needed for certain programs reading the EMF files
605
606 [-OO]
607 generate OpenOffice compatible EMF file
608
609 wemfc - Wogls version of EMF with experimental clip support
610 [-df]
611 write info about font processing
612
613 [-dumpfontmap]
614 write info about font mapping
615
616 [-size:psbbox]
617 use the bounding box as calculated by the PostScript frontent
618 as size
619
620 [-size:fullpage]
621 set the size to the size of a full page
622
623 [-size:automatic]
624 let windows calculate the bounding box (default)
625
626 [-keepimages]
627 debug option - keep the embedded bitmaps as external files
628
629 [-useoldpolydraw]
630 do not use Windows PolyDraw but an emulation of it - sometimes
631 needed for certain programs reading the EMF files
632
633 [-OO]
634 generate OpenOffice compatible EMF file
635
636 wemfnss - Wogls version of EMF - no subpathes
637 [-df]
638 write info about font processing
639
640 [-dumpfontmap]
641 write info about font mapping
642
643 [-size:psbbox]
644 use the bounding box as calculated by the PostScript frontent
645 as size
646
647 [-size:fullpage]
648 set the size to the size of a full page
649
650 [-size:automatic]
651 let windows calculate the bounding box (default)
652
653 [-keepimages]
654 debug option - keep the embedded bitmaps as external files
655
656 [-useoldpolydraw]
657 do not use Windows PolyDraw but an emulation of it - sometimes
658 needed for certain programs reading the EMF files
659
660 [-OO]
661 generate OpenOffice compatible EMF file
662
663 hpgl - HPGL code
664 [-pen]
665 plotter is pen plotter
666
667 [-pencolors number]
668 number of pen colors available
669
670 [-filltype string]
671 select fill type e.g. FT 1
672
673 [-rot90]
674 rotate hpgl by 90 degrees
675
676 [-rot180]
677 rotate hpgl by 180 degrees
678
679 [-rot270]
680 rotate hpgl by 270 degrees
681
682 pic - PIC format for troff et.al.
683 [-troff]
684 troff mode (default is groff)
685
686 [-landscape]
687 landscape output
688
689 [-portrait]
690 portrait output
691
692 [-keepfont]
693 print unrecognized literally
694
695 [-text]
696 try not to make pictures from running text
697
698 [-debug]
699 enable debug output
700
701 asy - Asymptote Format
702 No driver specific options
703
704 dxf - CAD exchange format
705 [-polyaslines]
706 use LINE instead of POLYLINE in DXF
707
708 [-mm]
709 use mm coordinates instead of points in DXF (mm=pt/72*25.4)
710
711 [-ctl]
712 map colors to layers
713
714 [-splineaspolyline]
715 approximate splines with PolyLines (only for -f dxf_s)
716
717 [-splineasnurb]
718 experimental (only for -f dxf_s)
719
720 [-splineasbspline]
721 experimental (only for -f dxf_s)
722
723 [-splineassinglespline]
724 experimental (only for -f dxf_s)
725
726 [-splineasmultispline]
727 experimental (only for -f dxf_s)
728
729 [-splineasbezier]
730 use Bezier splines in DXF format (only for -f dxf_s)
731
732 [-splineprecision number]
733 number of samples to take from spline curve when doing approxi‐
734 mation with -splineaspolyline or -splineasmultispline - should
735 be >= 2 (default 5)
736
737 dxf_s - CAD exchange format with splines
738 [-polyaslines]
739 use LINE instead of POLYLINE in DXF
740
741 [-mm]
742 use mm coordinates instead of points in DXF (mm=pt/72*25.4)
743
744 [-ctl]
745 map colors to layers
746
747 [-splineaspolyline]
748 approximate splines with PolyLines (only for -f dxf_s)
749
750 [-splineasnurb]
751 experimental (only for -f dxf_s)
752
753 [-splineasbspline]
754 experimental (only for -f dxf_s)
755
756 [-splineassinglespline]
757 experimental (only for -f dxf_s)
758
759 [-splineasmultispline]
760 experimental (only for -f dxf_s)
761
762 [-splineasbezier]
763 use Bezier splines in DXF format (only for -f dxf_s)
764
765 [-splineprecision number]
766 number of samples to take from spline curve when doing approxi‐
767 mation with -splineaspolyline or -splineasmultispline - should
768 be >= 2 (default 5)
769
770 fig - .fig format for xfig
771 The xfig format driver supports special fontnames, which may be pro‐
772 duced by using a fontmap file. The following types of names are sup‐
773 ported :
774 General notation:
775 "Postscript Font Name" ((LaTeX|PostScript|empty)(::special)::)XFigFontName
776
777 Examples:
778
779 Helvetica LaTeX::SansSerif
780 Courier LaTeX::special::Typewriter
781 GillSans "AvantGarde Demi"
782 Albertus PostScript::special::"New Century Schoolbook Italic"
783 Symbol ::special::Symbol (same as Postscript::special::Symbol)
784
785 See also the file examplefigmap.fmp in the misc directory of the
786 pstoedit source distribution for an example font map file for xfig.
787 Please note that the Fontname has to be among those supported by xfig.
788 See - http://www.xfig.org/userman/fig-format.html for a list of legal
789 font names
790
791 [-startdepth number]
792 Set the initial depth (default 999)
793
794 [-metric]
795 Switch to centimeter display (default inches)
796
797 [-usecorrectfontsize]
798 don't scale fonts for xfig. Use this if you also use this
799 option with xfig
800
801 [-depth number]
802 Set the page depth in inches (default 11)
803
804 xfig - .fig format for xfig
805 See fig format for more details.
806
807 [-startdepth number]
808 Set the initial depth (default 999)
809
810 [-metric]
811 Switch to centimeter display (default inches)
812
813 [-usecorrectfontsize]
814 don't scale fonts for xfig. Use this if you also use this
815 option with xfig
816
817 [-depth number]
818 Set the page depth in inches (default 11)
819
820 gnuplot - gnuplot format
821 No driver specific options
822
823 gschem - gschem format
824 See also: http://www.geda.seul.org/tools/gschem/
825
826 No driver specific options
827
828 idraw - Interviews draw format (EPS)
829 No driver specific options
830
831 java1 - java 1 applet source code
832 [java class name string]
833 name of java class to generate
834
835 java2 - java 2 source code
836 [java class name string]
837 name of java class to generate
838
839 kil - .kil format for Kontour
840 No driver specific options
841
842 latex2e - LaTeX2e picture format
843 [-integers]
844 round all coordinates to the nearest integer
845
846 lwo - LightWave 3D Object Format
847 No driver specific options
848
849 mma - Mathematica Graphics
850 [-eofillfills]
851 Filling is used for eofill (default is not to fill)
852
853 mpost - MetaPost Format
854 No driver specific options
855
856 noixml - Nemetschek NOI XML format
857 Nemetschek Object Interface XML format
858
859 [-r string]
860 Allplan resource file
861
862 [-bsl number]
863 Bezier Split Level (default 3)
864
865 pcbi - engrave data - insulate/PCB format
866 See http://home.vr-web.de/~hans-juergen-jahn/software/devpcb.html for
867 more details.
868
869 No driver specific options
870
871 pcb - pcb format
872 See also: http://pcb.sourceforge.net
873
874 No driver specific options
875
876 pcbfill - pcb format with fills
877 See also: http://pcb.sourceforge.net
878
879 No driver specific options
880
881 pdf - Adobe's Portable Document Format
882 No driver specific options
883
884 rib - RenderMan Interface Bytestream
885 No driver specific options
886
887 rpl - Real3D Programming Language Format
888 No driver specific options
889
890 sample - sample driver: if you don't want to see this, uncomment the corre‐
891 sponding line in makefile and make again
892 this is a long description for the sample driver
893
894 [-sampleoption integer]
895 just an example
896
897 sk - Sketch Format
898 No driver specific options
899
900 svm - StarView/OpenOffice.org metafile
901 StarView/OpenOffice.org metafile, readable from OpenOffice.org
902 1.0/StarOffice 6.0 and above.
903
904 [-m]
905 map to Arial
906
907 [-nf]
908 emulate narrow fonts
909
910 text - text in different forms
911 [-height number]
912 page height in terms of characters
913
914 [-width number]
915 page width in terms of characters
916
917 [-dump]
918 dump text pieces
919
920 tgif - Tgif .obj format
921 [-ta]
922 text as attribute
923
924 tk - tk and/or tk applet source code
925 [-R]
926 swap HW
927
928 [-I]
929 no impress
930
931 [-n string]
932 tagnames
933
934 wmf - Windows metafile
935 [-m]
936 map to Arial
937
938 [-nf]
939 emulate narrow fonts
940
941 [-drawbb]
942 draw bounding box
943
944 [-p]
945 prune line ends
946
947 [-nfw]
948 Newer versions of Windows (2000, XP, Vista) will not accept
949 WMF/EMF files generated when this option is set and the input
950 contains Text. But if this option is not set, then the WMF/EMF
951 driver will estimate interletter spacing of text using a very
952 coarse heuristic. This may result in ugly looking output. On the
953 other hand, OpenOffice can still read EMF/WMF files where
954 pstoedit delegates the calculation of the inter letter spacing
955 to the program reading the WMF/EMF file. So if the generated
956 WMF/EMF file shall never be processed under Windows, use this
957 option. If WMF/EMF files with high precision text need to be
958 generated under *nix the only option is to use the -pta option
959 of pstoedit. However that causes every text to be split into
960 single characters which makes the text hard to edit afterwards.
961 Hence the -nfw options provides a sort of compromise between
962 portability and nice to edit but still nice looking text. Again
963 - this option has no meaning when pstoedit is executed under
964 Windows anyway. In that case the output is portable but never‐
965 theless not split and still looks fine.
966
967 [-winbb]
968 let the Windows API calculate the Bounding Box (Windows only)
969
970 [-OO]
971 generate OpenOffice compatible EMF file
972
973 emf - Enhanced Windows metafile
974 [-m]
975 map to Arial
976
977 [-nf]
978 emulate narrow fonts
979
980 [-drawbb]
981 draw bounding box
982
983 [-p]
984 prune line ends
985
986 [-nfw]
987 Newer versions of Windows (2000, XP, Vista) will not accept
988 WMF/EMF files generated when this option is set and the input
989 contains Text. But if this option is not set, then the WMF/EMF
990 driver will estimate interletter spacing of text using a very
991 coarse heuristic. This may result in ugly looking output. On the
992 other hand, OpenOffice can still read EMF/WMF files where
993 pstoedit delegates the calculation of the inter letter spacing
994 to the program reading the WMF/EMF file. So if the generated
995 WMF/EMF file shall never be processed under Windows, use this
996 option. If WMF/EMF files with high precision text need to be
997 generated under *nix the only option is to use the -pta option
998 of pstoedit. However that causes every text to be split into
999 single characters which makes the text hard to edit afterwards.
1000 Hence the -nfw options provides a sort of compromise between
1001 portability and nice to edit but still nice looking text. Again
1002 - this option has no meaning when pstoedit is executed under
1003 Windows anyway. In that case the output is portable but never‐
1004 theless not split and still looks fine.
1005
1006 [-winbb]
1007 let the Windows API calculate the Bounding Box (Windows only)
1008
1009 [-OO]
1010 generate OpenOffice compatible EMF file
1011
1013 AUTOTRACE
1014 pstoedit cooperates with autotrace. Autotrace can now produce a dump
1015 file for further processing by pstoedit using the -bo (backend only)
1016 option. Autotrace is a program written by a group around Martin Weber
1017 and can be found at http://sourceforge.net/projects/autotrace/.
1018
1019 PS2AI
1020 The ps2ai output format driver is not a native pstoedit output format
1021 driver. It does not use the pstoedit postcript flattener, instead it
1022 uses the PostScript program ps2ai.ps which is installed in the Ghost‐
1023 Script distribution directory. It is included to provide the same
1024 "look-and-feel" for the conversion to AI. The additional benefit is
1025 that this conversion is now available also via the "convert-to-vector"
1026 menu of Gsview. However, lot's of files don't convert nicely or at all
1027 using ps2ai.ps. So a native pstoedit driver would be much better. Any‐
1028 one out there to take this? The AI format is usable for example by
1029 Mayura Draw (http://www.mayura.com). Also a driver to the Mayura
1030 native format would be nice.
1031
1032 An alternative to the ps2ai based driver is available via the -f
1033 plot:ai format if the libplot(ter) is installed.
1034
1035 You should use a version of GhostScript greater than or equal to 6.00
1036 for using the ps2ai output format driver.
1037
1038 METAPOST
1039 Note that, as far as Scott knows, MetaPost does not support Post‐
1040 Script's eofill. The metapost output format driver just converts eofill
1041 to fill, and issues a warning if verbose is set. Fortunately, very few
1042 PostScript programs rely on the even-odd fill rule, even though many
1043 specify it.
1044
1045 For more on MetaPost see:
1046
1047 http://cm.bell-labs.com/who/hobby/MetaPost.html
1048
1049 LATEX2E
1050 * LaTeX2e's picture environment is not very powerful. As a result,
1051 many elementary PostScript constructs are ignored -- fills, line
1052 thicknesses (besides "thick" and "thin"), and dash patterns, to
1053 name a few. Furthermore, complex pictures may overrun TeX's mem‐
1054 ory capacity.
1055
1056 * Some PostScript constructs are not supported directly by "pic‐
1057 ture", but can be handled by external packages. If a figure uses
1058 color, the top-level document will need to do a "\usepack‐
1059 age{color}". And if a figure contains rotated text, the
1060 top-level document will need to do a "\usepackage{rotating}".
1061
1062 * All lengths, coordinates, and font sizes output by the output
1063 format driver are in terms of \unitlength, so scaling a figure
1064 is simply a matter of doing a "\setlength{\unitlength}{...}".
1065
1066 * The output format driver currently supports one output format
1067 driver specific option, "integers", which rounds all lengths,
1068 coordinates, and font sizes to the nearest integer. This makes
1069 hand-editing the picture a little nicer.
1070
1071 * Why is this output format driver useful? One answer is portabil‐
1072 ity; any LaTeX2e system can handle the picture environment, even
1073 if it can't handle PostScript graphics. (pdfLaTeX comes to mind
1074 here.) A second answer is that pictures can be edited easily to
1075 contain any arbitrary LaTeX2e code. For instance, the text in a
1076 figure can be modified to contain complex mathematics, non-Latin
1077 alphabets, bibliographic citations, or -- the real reason Scott
1078 wrote the LaTeX2e output format driver -- hyperlinks to the sur‐
1079 rounding document (with help from the hyperref package).
1080
1081 CREATING A NEW OUTPUT FORMAT DRIVER
1082 To implement a new output format driver you can start from drvsampl.cpp
1083 and drvsampl.h. See also comments in drvbase.h and drvfuncs.h for an
1084 explanation of methods that should be implemented for a new output for‐
1085 mat driver.
1086
1088 A default PostScript interpreter to be called by pstoedit is specified
1089 at compile time. You can overwrite the default by setting the GS envi‐
1090 ronment variable to the name of a suitable PostScript interpreter.
1091
1092 You can check which name of a PostScript interpreter was compiled into
1093 pstoedit using: pstoedit -help -v.
1094
1095 See the GhostScript manual for descriptions of environment variables
1096 used by Ghostscript most importantly GS_FONTPATH and GS_LIB; other
1097 environment variables also affect output to display, print, and addi‐
1098 tional filtering and processing. See the related documentation.
1099
1100 pstoedit allocates temporary files using the function tempnam(3). Thus
1101 the location for temporary files might be controllable by other envi‐
1102 ronment variables used by this function. See the tempnam(3) manpage for
1103 descriptions of environment variables used. On UNIX like system this is
1104 probably the TMPDIR variable, on DOS/WINDOWS either TMP or TEMP.
1105
1107 If you have problems with pstoedit first try whether Ghostscript suc‐
1108 cessfully displays your file. If yes, then try pstoedit -f ps infile.ps
1109 testfile.ps and check whether testfile.ps still displays correctly
1110 using Ghostscript. If this file doesn't look correctly then there seems
1111 to be a problem with pstoedit's PostScript frontend. If this file looks
1112 good but the output for a specific format is wrong, the problem is
1113 probably in the output format driver for the specific format. In either
1114 case send bug fixes and reports to the author.
1115
1116 A common problem with PostScript files is that the PostScript file
1117 redefines one of the standard PostScript operators inconsistently.
1118 There is no effect of this if you just print the file since the origi‐
1119 nal PostScript "program" uses these new operator in the new meaning and
1120 does not use the original ones anymoew. However, when run under the
1121 control of pstoedit, these operators are expected to work with the
1122 original semantics.
1123
1124 So far I've seen redefinitions for:
1125
1126 * lt - "less-then" to mean "draw a line to"
1127
1128 * string - "create a string object" to mean "draw a string"
1129
1130 * length - "get the length of e.g. a string" to a "float constant"
1131
1132 I've included work-arounds for the ones mentioned above, but some oth‐
1133 ers could show up in addition to those.
1134
1136 * Non-standard fonts (e.g. TeXbitmap fonts) are mapped to a
1137 default font which can be changed using the -df option. pstoedit
1138 chooses the size of the replacement font such that the width of
1139 the string in the original font is the same as in the replace‐
1140 ment font. This is done for each text fragment displayed. Spe‐
1141 cial character encoding support is limited in this case. If a
1142 character cannot be mapped into the target format, pstoedit dis‐
1143 plays a '#' instead. See also the -uchar option.
1144
1145 * pstoedit supports bitmap graphics only for some output format
1146 drivers.
1147
1148 * Some output format drivers, e.g. the Gnuplot output format
1149 driver or the 3D output format driver (rpl, lwo, rib) do not
1150 support text.
1151
1152 * For most output format drivers pstoedit does not support clip‐
1153 ping (mainly due to limitations in the target format). You can
1154 try to use the -sclip option to simulate clipping. However, this
1155 doesn't work in all cases as expected.
1156
1157 * Special note about the Java output format drivers (java1 and
1158 java2). The java output format drivers generate a java source
1159 file that needs other files in order to be compiled and usable.
1160 These other files are Java classes (one applet and support
1161 classes) that allow to step through the individual pages of a
1162 converted PostScript document. This applet can easily be acti‐
1163 vated from a html-document. See the java/java1/readme_java1.txt
1164 or java/java2/readme_java2.htm file for more details.
1165
1167 1. Why do letters like O or B get strange if converted to tgif/xfig
1168 using the -dt option?
1169
1170 This is because most output format drivers don't support composite
1171 paths with intermediate gaps (moveto's) and second don't support very
1172 well the (eo)fill operators of PostScript (winding rule). For such
1173 objects pstoedit breaks them into smaller objects whenever such a gap
1174 is found. This results in the "hole" beeing filled with black color
1175 instead of beeing transparent. Since version 3.11 you can try the -ssp
1176 option in combination with the xfig output format driver.
1177
1178 2. Why does pstoedit produce ugly results from PostScript files
1179 generated by dvips?
1180
1181 TeX documents usually use bitmap fonts. Such fonts cannot be used as
1182 native font in other format. So pstoedit replaces the TeX font with
1183 another native font. Of course, the replacement font will in most cases
1184 produce another look, especially if mathematical symbols are used. Try
1185 to use PostScript fonts instead of the bitmap fonts when generating a
1186 PostScript file from TeX or LaTeX.
1187
1189 Wolfgang Glunz, wglunz34_AT_pstoedit.net
1190
1192 http://www.pstoedit.net/pstoedit/
1193
1194 At this site you also find more information about pstoedit and related
1195 programs and hints how to subscribe to a mailing list in order to get
1196 informed about new releases and bug-fixes.
1197
1199 * Klaus Steinberger Klaus.Steinberger_AT_physik.uni-muenchen.de
1200 wrote the initial version of this manpage.
1201
1202 * Lar Kaufman revised the increasingly complex command syntax dia‐
1203 grams and updated the structure and content of this manpage fol‐
1204 lowing release 2.5.
1205
1206 * David B. Rosen rosen_AT_unr.edu provided ideas and some Post‐
1207 Script code from his ps2aplot program.
1208
1209 * Ian MacPhedran Ian_MacPhedran_AT_engr.USask.CA provided the xfig
1210 output format driver.
1211
1212 * Carsten Hammer chammer_AT_hermes.hrz.uni-bielefeld.de provided
1213 the gnuplot output format driver and the initial DXF output for‐
1214 mat driver.
1215
1216 * Christoph Jaeschke provided the OS/2 metafile (MET) output for‐
1217 mat driver. Thomas Hoffmann thoffman_AT_zappa.sax.de did some
1218 further updates on the OS/2 part.
1219
1220 * Jens Weber rz47b7_AT_PostAG.DE provided the Windows metafile
1221 (WMF) output format driver, and a graphical user interface
1222 (GUI).
1223
1224 * G. Edward Johnson lorax_AT_nist.gov provided the CGM Draw
1225 library used in the CGM output format driver.
1226
1227 * Gerhard Kircher kircher_AT_edvz.tuwien.ac.at provided some bug
1228 fixes.
1229
1230 * Bill Cheng bill.cheng_AT_acm.org provided help with the tgif
1231 format and some changes to tgif to make the output format driver
1232 easier to implement. http://bourbon.usc.edu:8001/
1233
1234 * Reini Urban rurban_AT_sbox.tu-graz.ac.at provided input for the
1235 extended DXF output format driver.(http://autocad.xarch.at/)
1236
1237 * Glenn M. Lewis glenn_AT_gmlewis.com provided RenderMan (RIB),
1238 Real3D (RPL), and LightWave 3D (LWO) output format drivers.
1239 (http://www.gmlewis.com/)
1240
1241 * Piet van Oostrum piet_AT_cs.ruu.nl made several bug fixes.
1242
1243 * Lutz Vieweg lkv_AT_mania.robin.de provided several bug fixes and
1244 suggestions for improvements.
1245
1246 * Derek B. Noonburg derekn_AT_vw.ece.cmu.edu and Rainer Dorsch
1247 rd_AT_berlepsch.wohnheim.uni-ulm.de isolated and resolved a
1248 Linux-specific core dump problem.
1249
1250 * Rob Warner rcw2_AT_ukc.ac.uk made pstoedit compile under RiscOS.
1251
1252 * Patrick Gosling jpmg_AT_eng.cam.ac.uk made some suggestions
1253 regarding the usage of pstoedit in Ghostscript's SAFER mode.
1254
1255 * Scott Pakin pakin_AT_cs.uiuc.edu for the Idraw output format
1256 driver and the autoconf support.
1257
1258 * Peter Katzmann p.katzmann_AT_thiesen.com for the HPGL output
1259 format driver.
1260
1261 * Chris Cox ccox_AT_airmail.net contributed the Tcl/Tk output for‐
1262 mat driver.
1263
1264 * Thorsten Behrens Thorsten_Behrens_AT_public.uni-hamburg.de and
1265 Bjoern Petersen for reworking the WMF output format driver.
1266
1267 * Leszek Piotrowicz leszek_AT_sopot.rodan.pl implemented the image
1268 support for the xfig driver and a JAVA based GUI.
1269
1270 * Egil Kvaleberg egil_AT_kvaleberg.no contributed the pic output
1271 format driver.
1272
1273 * Kai-Uwe Sattler kus_AT_iti.cs.uni-magdeburg.de implemented the
1274 output format driver for Kontour.
1275
1276 * Scott Pakin, pakin_AT_cs.uiuc.edu) provided the MetaPost and
1277 LaTeX2e output format driver.
1278
1279 * Burkhard Plaum plaum_AT_IPF.Uni-Stuttgart.de added support for
1280 complex filled paths for the xfig output format driver.
1281
1282 * Bernhard Herzog herzog_AT_online.de contributed the output for‐
1283 mat driver for sketch ( http://www.skencil.org/ )
1284
1285 * Rolf Niepraschk (niepraschk_AT_ptb.de) converted the HTML man
1286 page to LaTeX. This allows to generate the UNIX style and the
1287 HTML manual from this base format.
1288
1289 * Several others sent smaller bug fixed and bug reports. Sorry if
1290 I don't mention them all here.
1291
1292 * Gisbert W. Selke (gisbert_AT_tapirsoft.de) for the Java 2 output
1293 format driver.
1294
1295 * Robert S. Maier (rsm_AT_math.arizona.edu) for many improvements
1296 on the libplot output format driver and for libplot itself.
1297
1298 * The authors of pstotext (mcjones_AT_pa.dec.com and bir‐
1299 rell_AT_pa.dec.com) for giving me the permission to use their
1300 simple PostScript code for performing rotation.
1301
1302 * Daniel Gehriger gehriger_AT_linkcad.com for his help concerning
1303 the handling of Splines in the DXF format.
1304
1305 * Allen Barnett libemf_AT_lignumcomputing.com for his work on the
1306 libEMF which allows to create WMF/EMF files under *nix systems.
1307
1308 * Dave dave_AT_opaque.net for providing the libming which is a
1309 multiplatform library for generating SWF files.
1310
1311 * Masatake Yamoto for the introduction of autoconf, automake and
1312 libtool into pstoedit
1313
1314 * Bob Friesenhahn for his help and the building of the Magick++
1315 API to ImageMagick.
1316
1317 * But most important: Peter Deutsch ghost_AT_aladdin.com and Rus‐
1318 sell Lang gsview_AT_ghostgum.com.au for their help and answers
1319 regarding GhostScript and gsview.
1320
1322 Trademarks mentioned are the property of their respective owners.
1323
1324 Some code incorporated in the pstoedit package is subject to copyright
1325 or other intellectual property rights or restrictions including attri‐
1326 bution rights. See the notes in individual files.
1327
1328 pstoedit is controlled under the Free Software Foundation GNU Public
1329 License (GPL). However, this does not apply to importps and the addi‐
1330 tional plugins.
1331
1332 Aladdin Ghostscript is a redistributable software package with copy‐
1333 right restrictions controlled by Aladdin Software.
1334
1335 pstoedit has no other relation to Ghostscript besides calling it in a
1336 subprocess.
1337
1338 The authors, contributors, and distributors of pstoedit are not respon‐
1339 sible for its use for any purpose, or for the results generated
1340 thereby.
1341
1342 Restrictions such as the foregoing may apply in other countries accord‐
1343 ing to international conventions and agreements.
1344
1345Conversion Tools September 2007 PSTOEDIT(1)