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