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