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.44 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 standalong 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 [-texmode]
551 TeX Mode
552
553 [-imagetofile]
554 write raster images to separate files instead of embedding them
555
556 [-notextrendering]
557 do not write textrendering attribute
558
559 [-border number]
560 additional border to draw around bare bounding box (in percent
561 of width and height)
562
563 cgmb1 - CGM binary Format (V1)
564 No driver specific options
565
566 cgmb - CGM binary Format (V3)
567 No driver specific options
568
569 cgmt - CGM textual Format
570 No driver specific options
571
572 mif - (Frame)Maker Intermediate Format
573 [-nopage]
574 do not add a separate Page entry
575
576 rtf - RTF Format
577 No driver specific options
578
579 wemf - Wogls version of EMF
580 [-df]
581 write info about font processing
582
583 [-dumpfontmap]
584 write info about font mapping
585
586 [-size:psbbox]
587 use the bounding box as calculated by the PostScript frontent
588 as size
589
590 [-size:fullpage]
591 set the size to the size of a full page
592
593 [-size:automatic]
594 let windows calculate the bounding box (default)
595
596 [-keepimages]
597 debug option - keep the embedded bitmaps as external files
598
599 [-useoldpolydraw]
600 do not use Windows PolyDraw but an emulation of it - sometimes
601 needed for certain programs reading the EMF files
602
603 [-OO]
604 generate OpenOffice compatible EMF file
605
606 wemfc - Wogls version of EMF with experimental clip support
607 [-df]
608 write info about font processing
609
610 [-dumpfontmap]
611 write info about font mapping
612
613 [-size:psbbox]
614 use the bounding box as calculated by the PostScript frontent
615 as size
616
617 [-size:fullpage]
618 set the size to the size of a full page
619
620 [-size:automatic]
621 let windows calculate the bounding box (default)
622
623 [-keepimages]
624 debug option - keep the embedded bitmaps as external files
625
626 [-useoldpolydraw]
627 do not use Windows PolyDraw but an emulation of it - sometimes
628 needed for certain programs reading the EMF files
629
630 [-OO]
631 generate OpenOffice compatible EMF file
632
633 wemfnss - Wogls version of EMF - no subpathes
634 [-df]
635 write info about font processing
636
637 [-dumpfontmap]
638 write info about font mapping
639
640 [-size:psbbox]
641 use the bounding box as calculated by the PostScript frontent
642 as size
643
644 [-size:fullpage]
645 set the size to the size of a full page
646
647 [-size:automatic]
648 let windows calculate the bounding box (default)
649
650 [-keepimages]
651 debug option - keep the embedded bitmaps as external files
652
653 [-useoldpolydraw]
654 do not use Windows PolyDraw but an emulation of it - sometimes
655 needed for certain programs reading the EMF files
656
657 [-OO]
658 generate OpenOffice compatible EMF file
659
660 hpgl - HPGL code
661 [-pen]
662 plotter is pen plotter
663
664 [-pencolors number]
665 number of pen colors available
666
667 [-filltype string]
668 select fill type e.g. FT 1
669
670 [-rot90]
671 rotate hpgl by 90 degrees
672
673 [-rot180]
674 rotate hpgl by 180 degrees
675
676 [-rot270]
677 rotate hpgl by 270 degrees
678
679 pic - PIC format for troff et.al.
680 [-troff]
681 troff mode (default is groff)
682
683 [-landscape]
684 landscape output
685
686 [-portrait]
687 portrait output
688
689 [-keepfont]
690 print unrecognized literally
691
692 [-text]
693 try not to make pictures from running text
694
695 [-debug]
696 enable debug output
697
698 asy - Asymptote Format
699 No driver specific options
700
701 dxf - CAD exchange format
702 [-polyaslines]
703 use LINE instead of POLYLINE in DXF
704
705 [-mm]
706 use mm coordinates instead of points in DXF (mm=pt/72*25.4)
707
708 [-ctl]
709 map colors to layers
710
711 [-splineaspolyline]
712 approximate splines with PolyLines (only for -f dxf_s)
713
714 [-splineasnurb]
715 experimental (only for -f dxf_s)
716
717 [-splineasbspline]
718 experimental (only for -f dxf_s)
719
720 [-splineassinglespline]
721 experimental (only for -f dxf_s)
722
723 [-splineasmultispline]
724 experimental (only for -f dxf_s)
725
726 [-splineasbezier]
727 use Bezier splines in DXF format (only for -f dxf_s)
728
729 [-splineprecision number]
730 number of samples to take from spline curve when doing approxi‐
731 mation with -splineaspolyline or -splineasmultispline - should
732 be >= 2 (default 5)
733
734 dxf_s - CAD exchange format with splines
735 [-polyaslines]
736 use LINE instead of POLYLINE in DXF
737
738 [-mm]
739 use mm coordinates instead of points in DXF (mm=pt/72*25.4)
740
741 [-ctl]
742 map colors to layers
743
744 [-splineaspolyline]
745 approximate splines with PolyLines (only for -f dxf_s)
746
747 [-splineasnurb]
748 experimental (only for -f dxf_s)
749
750 [-splineasbspline]
751 experimental (only for -f dxf_s)
752
753 [-splineassinglespline]
754 experimental (only for -f dxf_s)
755
756 [-splineasmultispline]
757 experimental (only for -f dxf_s)
758
759 [-splineasbezier]
760 use Bezier splines in DXF format (only for -f dxf_s)
761
762 [-splineprecision number]
763 number of samples to take from spline curve when doing approxi‐
764 mation with -splineaspolyline or -splineasmultispline - should
765 be >= 2 (default 5)
766
767 fig - .fig format for xfig
768 The xfig format driver supports special fontnames, which may be pro‐
769 duced by using a fontmap file. The following types of names are sup‐
770 ported :
771 General notation:
772 "Postscript Font Name" ((LaTeX|PostScript|empty)(::special)::)XFigFontName
773
774 Examples:
775
776 Helvetica LaTeX::SansSerif
777 Courier LaTeX::special::Typewriter
778 GillSans "AvantGarde Demi"
779 Albertus PostScript::special::"New Century Schoolbook Italic"
780 Symbol ::special::Symbol (same as Postscript::special::Symbol)
781
782 See also the file examplefigmap.fmp in the misc directory of the
783 pstoedit source distribution for an example font map file for xfig.
784 Please note that the Fontname has to be among those supported by xfig.
785 See - http://www.xfig.org/userman/fig-format.html for a list of legal
786 font names
787
788 [-startdepth number]
789 Set the initial depth (default 999)
790
791 [-metric]
792 Switch to centimeter display (default inches)
793
794 [-usecorrectfontsize]
795 don't scale fonts for xfig. Use this if you also use this
796 option with xfig
797
798 [-depth number]
799 Set the page depth in inches (default 11)
800
801 xfig - .fig format for xfig
802 See fig format for more details.
803
804 [-startdepth number]
805 Set the initial depth (default 999)
806
807 [-metric]
808 Switch to centimeter display (default inches)
809
810 [-usecorrectfontsize]
811 don't scale fonts for xfig. Use this if you also use this
812 option with xfig
813
814 [-depth number]
815 Set the page depth in inches (default 11)
816
817 gnuplot - gnuplot format
818 No driver specific options
819
820 gschem - gschem format
821 See also: http://www.geda.seul.org/tools/gschem/
822
823 No driver specific options
824
825 idraw - Interviews draw format (EPS)
826 No driver specific options
827
828 java1 - java 1 applet source code
829 [java class name string]
830 name of java class to generate
831
832 java2 - java 2 source code
833 [java class name string]
834 name of java class to generate
835
836 kil - .kil format for Kontour
837 No driver specific options
838
839 latex2e - LaTeX2e picture format
840 [-integers]
841 round all coordinates to the nearest integer
842
843 lwo - LightWave 3D Object Format
844 No driver specific options
845
846 mma - Mathematica Graphics
847 [-eofillfills]
848 Filling is used for eofill (default is not to fill)
849
850 mpost - MetaPost Format
851 No driver specific options
852
853 noixml - Nemetschek NOI XML format
854 Nemetschek Object Interface XML format
855
856 [-r string]
857 Allplan resource file
858
859 [-bsl number]
860 Bezier Split Level (default 3)
861
862 pcbi - engrave data - insulate/PCB format
863 See http://home.vr-web.de/~hans-juergen-jahn/software/devpcb.html for
864 more details.
865
866 No driver specific options
867
868 pcb - pcb format
869 See also: http://pcb.sourceforge.net
870
871 No driver specific options
872
873 pcbfill - pcb format with fills
874 See also: http://pcb.sourceforge.net
875
876 No driver specific options
877
878 pdf - Adobe's Portable Document Format
879 No driver specific options
880
881 rib - RenderMan Interface Bytestream
882 No driver specific options
883
884 rpl - Real3D Programming Language Format
885 No driver specific options
886
887 sample - sample driver: if you don't want to see this, uncomment the corre‐
888 sponding line in makefile and make again
889 this is a long description for the sample driver
890
891 [-sampleoption integer]
892 just an example
893
894 sk - Sketch Format
895 No driver specific options
896
897 svm - StarView/OpenOffice.org metafile
898 StarView/OpenOffice.org metafile, readable from OpenOffice.org
899 1.0/StarOffice 6.0 and above.
900
901 [-m]
902 map to Arial
903
904 [-nf]
905 emulate narrow fonts
906
907 text - text in different forms
908 [-height number]
909 page height in terms of characters
910
911 [-width number]
912 page width in terms of characters
913
914 [-dump]
915 dump text pieces
916
917 tgif - Tgif .obj format
918 [-ta]
919 text as attribute
920
921 tk - tk and/or tk applet source code
922 [-R]
923 swap HW
924
925 [-I]
926 no impress
927
928 [-n string]
929 tagnames
930
931 wmf - Windows metafile
932 [-m]
933 map to Arial
934
935 [-nf]
936 emulate narrow fonts
937
938 [-drawbb]
939 draw bounding box
940
941 [-p]
942 prune line ends
943
944 [-nfw]
945 Newer versions of Windows (2000, XP) will not accept WMF/EMF
946 files generated when this option is set and the input contains
947 Text. But if this option is not set, then the WMF/EMF driver
948 will estimate interletter spacing of text using a very coarse
949 heuristic. This may result in ugly looking output. On the other
950 hand, OpenOffice can still read EMF/WMF files where pstoedit
951 delegates the calculation of the inter letter spacing to the
952 program reading the WMF/EMF file. So if the generated WMF/EMF
953 file shall never be processed under Windows, use this option. If
954 WMF/EMF files with high precision text need to be generated
955 under *nix the only option is to use the -pta option of
956 pstoedit. However that causes every text to be split into single
957 characters which makes the text hard to edit afterwards. Hence
958 the -nfw options provides a sort of compromise between portabil‐
959 ity and nice to edit but still nice looking text. Again - this
960 option has no meaning when pstoedit is executed under Windows
961 anyway. In that case the output is portable but nevertheless not
962 split and still looks fine.
963
964 [-winbb]
965 let the Windows API calculate the Bounding Box (Windows only)
966
967 [-OO]
968 generate OpenOffice compatible EMF file
969
970 emf - Enhanced Windows metafile
971 [-m]
972 map to Arial
973
974 [-nf]
975 emulate narrow fonts
976
977 [-drawbb]
978 draw bounding box
979
980 [-p]
981 prune line ends
982
983 [-nfw]
984 Newer versions of Windows (2000, XP) will not accept WMF/EMF
985 files generated when this option is set and the input contains
986 Text. But if this option is not set, then the WMF/EMF driver
987 will estimate interletter spacing of text using a very coarse
988 heuristic. This may result in ugly looking output. On the other
989 hand, OpenOffice can still read EMF/WMF files where pstoedit
990 delegates the calculation of the inter letter spacing to the
991 program reading the WMF/EMF file. So if the generated WMF/EMF
992 file shall never be processed under Windows, use this option. If
993 WMF/EMF files with high precision text need to be generated
994 under *nix the only option is to use the -pta option of
995 pstoedit. However that causes every text to be split into single
996 characters which makes the text hard to edit afterwards. Hence
997 the -nfw options provides a sort of compromise between portabil‐
998 ity and nice to edit but still nice looking text. Again - this
999 option has no meaning when pstoedit is executed under Windows
1000 anyway. In that case the output is portable but nevertheless not
1001 split and still looks fine.
1002
1003 [-winbb]
1004 let the Windows API calculate the Bounding Box (Windows only)
1005
1006 [-OO]
1007 generate OpenOffice compatible EMF file
1008
1010 AUTOTRACE
1011 pstoedit cooperates with autotrace. Autotrace can now produce a dump
1012 file for further processing by pstoedit using the -bo (backend only)
1013 option. Autotrace is a program written by a group around Martin Weber
1014 and can be found at http://sourceforge.net/projects/autotrace/.
1015
1016 PS2AI
1017 The ps2ai output format driver is not a native pstoedit output format
1018 driver. It does not use the pstoedit postcript flattener, instead it
1019 uses the PostScript program ps2ai.ps which is installed in the Ghost‐
1020 Script distribution directory. It is included to provide the same
1021 "look-and-feel" for the conversion to AI. The additional benefit is
1022 that this conversion is now available also via the "convert-to-vector"
1023 menu of Gsview. However, lot's of files don't convert nicely or at all
1024 using ps2ai.ps. So a native pstoedit driver would be much better. Any‐
1025 one out there to take this? The AI format is usable for example by
1026 Mayura Draw (http://www.mayura.com). Also a driver to the Mayura
1027 native format would be nice.
1028
1029 An alternative to the ps2ai based driver is available via the -f
1030 plot:ai format if the libplot(ter) is installed.
1031
1032 You should use a version of GhostScript greater than or equal to 6.00
1033 for using the ps2ai output format driver.
1034
1035 METAPOST
1036 Note that, as far as Scott knows, MetaPost does not support Post‐
1037 Script's eofill. The metapost output format driver just converts eofill
1038 to fill, and issues a warning if verbose is set. Fortunately, very few
1039 PostScript programs rely on the even-odd fill rule, even though many
1040 specify it.
1041
1042 For more on MetaPost see:
1043
1044 http://cm.bell-labs.com/who/hobby/MetaPost.html
1045
1046 LATEX2E
1047 * LaTeX2e's picture environment is not very powerful. As a result,
1048 many elementary PostScript constructs are ignored -- fills, line
1049 thicknesses (besides "thick" and "thin"), and dash patterns, to
1050 name a few. Furthermore, complex pictures may overrun TeX's mem‐
1051 ory capacity.
1052
1053 * Some PostScript constructs are not supported directly by "pic‐
1054 ture", but can be handled by external packages. If a figure uses
1055 color, the top-level document will need to do a "\usepack‐
1056 age{color}". And if a figure contains rotated text, the
1057 top-level document will need to do a "\usepackage{rotating}".
1058
1059 * All lengths, coordinates, and font sizes output by the output
1060 format driver are in terms of \unitlength, so scaling a figure
1061 is simply a matter of doing a "\setlength{\unitlength}{...}".
1062
1063 * The output format driver currently supports one output format
1064 driver specific option, "integers", which rounds all lengths,
1065 coordinates, and font sizes to the nearest integer. This makes
1066 hand-editing the picture a little nicer.
1067
1068 * Why is this output format driver useful? One answer is portabil‐
1069 ity; any LaTeX2e system can handle the picture environment, even
1070 if it can't handle PostScript graphics. (pdfLaTeX comes to mind
1071 here.) A second answer is that pictures can be edited easily to
1072 contain any arbitrary LaTeX2e code. For instance, the text in a
1073 figure can be modified to contain complex mathematics, non-Latin
1074 alphabets, bibliographic citations, or -- the real reason Scott
1075 wrote the LaTeX2e output format driver -- hyperlinks to the sur‐
1076 rounding document (with help from the hyperref package).
1077
1078 CREATING A NEW OUTPUT FORMAT DRIVER
1079 To implement a new output format driver you can start from drvsampl.cpp
1080 and drvsampl.h. See also comments in drvbase.h and drvfuncs.h for an
1081 explanation of methods that should be implemented for a new output for‐
1082 mat driver.
1083
1085 A default PostScript interpreter to be called by pstoedit is specified
1086 at compile time. You can overwrite the default by setting the GS envi‐
1087 ronment variable to the name of a suitable PostScript interpreter.
1088
1089 You can check which name of a PostScript interpreter was compiled into
1090 pstoedit using: pstoedit -help -v.
1091
1092 See the GhostScript manual for descriptions of environment variables
1093 used by Ghostscript most importantly GS_FONTPATH and GS_LIB; other
1094 environment variables also affect output to display, print, and addi‐
1095 tional filtering and processing. See the related documentation.
1096
1097 pstoedit allocates temporary files using the function tempnam(3). Thus
1098 the location for temporary files might be controllable by other envi‐
1099 ronment variables used by this function. See the tempnam(3) manpage for
1100 descriptions of environment variables used. On UNIX like system this is
1101 probably the TMPDIR variable, on DOS/WINDOWS either TMP or TEMP.
1102
1104 If you have problems with pstoedit first try whether Ghostscript suc‐
1105 cessfully displays your file. If yes, then try pstoedit -f ps infile.ps
1106 testfile.ps and check whether testfile.ps still displays correctly
1107 using Ghostscript. If this file doesn't look correctly then there seems
1108 to be a problem with pstoedit's PostScript frontend. If this file looks
1109 good but the output for a specific format is wrong, the problem is
1110 probably in the output format driver for the specific format. In either
1111 case send bug fixes and reports to the author.
1112
1113 A common problem with PostScript files is that the PostScript file
1114 redefines one of the standard PostScript operators inconsistently.
1115 There is no effect of this if you just print the file since the origi‐
1116 nal PostScript "program" uses these new operator in the new meaning and
1117 does not use the original ones anymoew. However, when run under the
1118 control of pstoedit, these operators are expected to work with the
1119 original semantics.
1120
1121 So far I've seen redefinitions for:
1122
1123 * lt - "less-then" to mean "draw a line to"
1124
1125 * string - "create a string object" to mean "draw a string"
1126
1127 * length - "get the length of e.g. a string" to a "float constant"
1128
1129 I've included work-arounds for the ones mentioned above, but some oth‐
1130 ers could show up in addition to those.
1131
1133 * Non-standard fonts (e.g. TeXbitmap fonts) are mapped to a
1134 default font which can be changed using the -df option. pstoedit
1135 chooses the size of the replacement font such that the width of
1136 the string in the original font is the same as in the replace‐
1137 ment font. This is done for each text fragment displayed. Spe‐
1138 cial character encoding support is limited in this case. If a
1139 character cannot be mapped into the target format, pstoedit dis‐
1140 plays a '#' instead. See also the -uchar option.
1141
1142 * pstoedit supports bitmap graphics only for some output format
1143 drivers.
1144
1145 * Some output format drivers, e.g. the Gnuplot output format
1146 driver or the 3D output format driver (rpl, lwo, rib) do not
1147 support text.
1148
1149 * For most output format drivers pstoedit does not support clip‐
1150 ping (mainly due to limitations in the target format). You can
1151 try to use the -sclip option to simulate clipping. However, this
1152 doesn't work in all cases as expected.
1153
1154 * Special note about the Java output format drivers (java1 and
1155 java2). The java output format drivers generate a java source
1156 file that needs other files in order to be compiled and usable.
1157 These other files are Java classes (one applet and support
1158 classes) that allow to step through the individual pages of a
1159 converted PostScript document. This applet can easily be acti‐
1160 vated from a html-document. See the java/java1/readme_java1.txt
1161 or java/java2/readme_java2.htm file for more details.
1162
1164 1. Why do letters like O or B get strange if converted to tgif/xfig
1165 using the -dt option?
1166
1167 This is because most output format drivers don't support composite
1168 paths with intermediate gaps (moveto's) and second don't support very
1169 well the (eo)fill operators of PostScript (winding rule). For such
1170 objects pstoedit breaks them into smaller objects whenever such a gap
1171 is found. This results in the "hole" beeing filled with black color
1172 instead of beeing transparent. Since version 3.11 you can try the -ssp
1173 option in combination with the xfig output format driver.
1174
1175 2. Why does pstoedit produce ugly results from PostScript files
1176 generated by dvips?
1177
1178 TeX documents usually use bitmap fonts. Such fonts cannot be used as
1179 native font in other format. So pstoedit replaces the TeX font with
1180 another native font. Of course, the replacement font will in most cases
1181 produce another look, especially if mathematical symbols are used. Try
1182 to use PostScript fonts instead of the bitmap fonts when generating a
1183 PostScript file from TeX or LaTeX.
1184
1186 Wolfgang Glunz, wglunz34_AT_pstoedit.net
1187
1189 http://www.pstoedit.net/pstoedit/
1190
1191 At this site you also find more information about pstoedit and related
1192 programs and hints how to subscribe to a mailing list in order to get
1193 informed about new releases and bug-fixes.
1194
1196 * Klaus Steinberger Klaus.Steinberger_AT_physik.uni-muenchen.de
1197 wrote the initial version of this manpage.
1198
1199 * Lar Kaufman revised the increasingly complex command syntax dia‐
1200 grams and updated the structure and content of this manpage fol‐
1201 lowing release 2.5.
1202
1203 * David B. Rosen rosen_AT_unr.edu provided ideas and some Post‐
1204 Script code from his ps2aplot program.
1205
1206 * Ian MacPhedran Ian_MacPhedran_AT_engr.USask.CA provided the xfig
1207 output format driver.
1208
1209 * Carsten Hammer chammer_AT_hermes.hrz.uni-bielefeld.de provided
1210 the gnuplot output format driver and the initial DXF output for‐
1211 mat driver.
1212
1213 * Christoph Jaeschke provided the OS/2 metafile (MET) output for‐
1214 mat driver. Thomas Hoffmann thoffman_AT_zappa.sax.de did some
1215 further updates on the OS/2 part.
1216
1217 * Jens Weber rz47b7_AT_PostAG.DE provided the Windows metafile
1218 (WMF) output format driver, and a graphical user interface
1219 (GUI).
1220
1221 * G. Edward Johnson lorax_AT_nist.gov provided the CGM Draw
1222 library used in the CGM output format driver.
1223
1224 * Gerhard Kircher kircher_AT_edvz.tuwien.ac.at provided some bug
1225 fixes.
1226
1227 * Bill Cheng bill.cheng_AT_acm.org provided help with the tgif
1228 format and some changes to tgif to make the output format driver
1229 easier to implement. http://bourbon.usc.edu:8001/
1230
1231 * Reini Urban rurban_AT_sbox.tu-graz.ac.at provided input for the
1232 extended DXF output format
1233 driver.(http://xarch.tu-graz.ac.at/autocad/)
1234
1235 * Glenn M. Lewis glenn_AT_gmlewis.com provided RenderMan (RIB),
1236 Real3D (RPL), and LightWave 3D (LWO) output format drivers.
1237 (http://www.gmlewis.com/)
1238
1239 * Piet van Oostrum piet_AT_cs.ruu.nl made several bug fixes.
1240
1241 * Lutz Vieweg lkv_AT_mania.robin.de provided several bug fixes and
1242 suggestions for improvements.
1243
1244 * Derek B. Noonburg derekn_AT_vw.ece.cmu.edu and Rainer Dorsch
1245 rd_AT_berlepsch.wohnheim.uni-ulm.de isolated and resolved a
1246 Linux-specific core dump problem.
1247
1248 * Rob Warner rcw2_AT_ukc.ac.uk made pstoedit compile under RiscOS.
1249
1250 * Patrick Gosling jpmg_AT_eng.cam.ac.uk made some suggestions
1251 regarding the usage of pstoedit in Ghostscript's SAFER mode.
1252
1253 * Scott Pakin pakin_AT_cs.uiuc.edu for the Idraw output format
1254 driver and the autoconf support.
1255
1256 * Peter Katzmann p.katzmann_AT_thiesen.com for the HPGL output
1257 format driver.
1258
1259 * Chris Cox ccox_AT_airmail.net contributed the Tcl/Tk output for‐
1260 mat driver.
1261
1262 * Thorsten Behrens Thorsten_Behrens_AT_public.uni-hamburg.de and
1263 Bjoern Petersen for reworking the WMF output format driver.
1264
1265 * Leszek Piotrowicz leszek_AT_sopot.rodan.pl implemented the image
1266 support for the xfig driver and a JAVA based GUI.
1267
1268 * Egil Kvaleberg egil_AT_kvaleberg.no contributed the pic output
1269 format driver.
1270
1271 * Kai-Uwe Sattler kus_AT_iti.cs.uni-magdeburg.de implemented the
1272 output format driver for Kontour.
1273
1274 * Scott Pakin, pakin_AT_cs.uiuc.edu) provided the MetaPost and
1275 LaTeX2e output format driver.
1276
1277 * Burkhard Plaum plaum_AT_IPF.Uni-Stuttgart.de added support for
1278 complex filled paths for the xfig output format driver.
1279
1280 * Bernhard Herzog herzog_AT_online.de contributed the output for‐
1281 mat driver for sketch ( http://www.skencil.org/ )
1282
1283 * Rolf Niepraschk (niepraschk_AT_ptb.de) converted the HTML man
1284 page to LaTeX. This allows to generate the UNIX style and the
1285 HTML manual from this base format.
1286
1287 * Several others sent smaller bug fixed and bug reports. Sorry if
1288 I don't mention them all here.
1289
1290 * Gisbert W. Selke (gisbert_AT_tapirsoft.de) for the Java 2 output
1291 format driver.
1292
1293 * Robert S. Maier (rsm_AT_math.arizona.edu) for many improvements
1294 on the libplot output format driver and for libplot itself.
1295
1296 * The authors of pstotext (mcjones_AT_pa.dec.com and bir‐
1297 rell_AT_pa.dec.com) for giving me the permission to use their
1298 simple PostScript code for performing rotation.
1299
1300 * Daniel Gehriger gehriger_AT_linkcad.com for his help concerning
1301 the handling of Splines in the DXF format.
1302
1303 * Allen Barnett libemf_AT_lignumcomputing.com for his work on the
1304 libEMF which allows to create WMF/EMF files under *nix systems.
1305
1306 * Dave dave_AT_opaque.net for providing the libming which is a
1307 multiplatform library for generating SWF files.
1308
1309 * Masatake Yamoto for the introduction of autoconf, automake and
1310 libtool into pstoedit
1311
1312 * Bob Friesenhahn for his help and the building of the Magick++
1313 API to ImageMagick.
1314
1315 * But most important: Peter Deutsch ghost_AT_aladdin.com and Rus‐
1316 sell Lang gsview_AT_ghostgum.com.au for their help and answers
1317 regarding GhostScript and gsview.
1318
1320 Trademarks mentioned are the property of their respective owners.
1321
1322 Some code incorporated in the pstoedit package is subject to copyright
1323 or other intellectual property rights or restrictions including attri‐
1324 bution rights. See the notes in individual files.
1325
1326 pstoedit is controlled under the Free Software Foundation GNU Public
1327 License (GPL). However, this does not apply to importps and the addi‐
1328 tional plugins.
1329
1330 Aladdin Ghostscript is a redistributable software package with copy‐
1331 right restrictions controlled by Aladdin Software.
1332
1333 pstoedit has no other relation to Ghostscript besides calling it in a
1334 subprocess.
1335
1336 The authors, contributors, and distributors of pstoedit are not respon‐
1337 sible for its use for any purpose, or for the results generated
1338 thereby.
1339
1340 Restrictions such as the foregoing may apply in other countries accord‐
1341 ing to international conventions and agreements.
1342
1343Conversion Tools March 2006 PSTOEDIT(1)