1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="default.css" type="text/css"/>
<title>Epspdf and epspdftk User Guide</title>
</head><body>
<h1 class="display">Epspdf and epspdftk User Guide</h1>
<p class="display">A multiplatform GUI- and command-line converter
for [e]ps and pdf.</p>
<p class="display"><i>Siep Kroonenberg,<br/><tt>siepo at cybercomm
dot nl</tt></i></p>
<h2>Overview</h2>
<p>Epspdftk converts files between eps, pdf and general
PostScript. The main screen lets you open a file, select some options
and convert the file.</p>
<p>When opening a file, epspdf tries to find out file type and, in
the case of a pdf file, the number of pages. This information is
displayed in the box in the upper half of the screen.</p>
<p class="display"><img src="images/main_w32.png" alt=""/></p>
<h2>Viewing</h2>
<p>The View button at the bottom of the screen calls an appropriate
external viewer. For Windows this is determined by the default Open
command, for OS X it is always Preview, and under Linux it is
configurable; see below under <a href="#configure">The Configuration
screen.</a></p>
<p>The View button is grayed if epspdf thinks that there is no
previewer for the current file.</p>
<p class="display"><img src="images/greenbroccoli.png" alt=""/></p>
<h2>Conversion options</h2>
<p><a name="gray"><i>Grayscaling:</i></a> Simple color figures can
be converted to grayscale. Grayscaling will fail for bitmapped data
and for advanced color models. 'Try harder to grayscale' will handle
a few more cases, but may take longer and still won't handle
bitmaps.</p>
<p><i>Call for assistance:</i> If a PostScript color expert is
reading this: please have a look at makegray.pro and see whether you
can come up with something that handles more color models.</p>
<p><i>Compute tight boundingbox:</i> This option is only available
if a single page is converted.</p>
<p><i>Page selection:</i> The only possibilities are selecting a
single page or selecting all pages. When converting to eps you are
restricted to a single page.</p>
<p>For general PostScript files, there is no quick way to determine
the number of pages, so the program won't check beforehand whether
you picked an existing page. If you picked a non-existent page, the
program will abort. If you don't like that, convert the entire
document to pdf first - which will be done behind the scenes
anyhow.</p>
<p>Specifying options such as grayscaling or page selection may
require several roundtrips between PostScript or eps and pdf. If
epspdf cannot use pdftops then some combinations of options will not
be available.</p>
<h2>Converting</h2>
<p>The Convert and save... button calls up a file save dialog, with
appropriate default extension. After a successful conversion, the
result becomes the new current file, so you can judge the result by
pressing the View button again.</p>
<p class="display"><img src="images/dia_save.png" alt=""/></p>
<h2><a name="configure">The configuration screen</a></h2>
<p>Epspdftk also has a configuration screen. The settings here are
preserved between sessions. Pay particular attention to 'Intended
use' under PDF CONVERSION. Choose 'prepress' for pdfs which are
intended for commercial printing. This option will try to embed all
fonts, among other things. More and more often, printshops insist on
this. With luck, Ghostscript fonts and system fonts will be used for
fonts which were not originally embedded.</p>
<p>Under Windows, this screen also lets you tell the program where
to find pdftops.exe. Under Linux, it lets you pick PostScript- and
pdf previewers.</p>
<p class="display"><img src="images/config_mac.png" alt=""/></p>
<h2>Adding standard fonts to an existing pdf</h2>
<p>You can add standard fonts such as Times and Helvetica to an
existing pdf: first, convert to ps, with 'Convert all pages'
selected. Then, make sure that in the configuration screen 'Intended
use' is set to prepress, then convert back to pdf.</p>
<p>If this option is set to screen, then standard fonts will be
removed instead of added. This option may also affect the resolution
of bitmaps.</p>
<h2>Eps preview headers</h2>
<p>Preview headers are quietly stripped from eps files. These
preview headers are used by e.g. desktop-publishing software to
represent eps files on screen without having to interpret the
PostScript code itself. Epspdf currently has no option to preserve
or add them.</p>
<h2>Exporting PostScript from Windows programs</h2>
<p>Often, the only way to get EPS or PostScript from a Windows
program is by 'printing' to a PostScript file. From some programs,
you can print a selection. A suitable driver which comes with
Windows is Generic / MS Publisher Imagesetter. Pay attention to the
printer properties: avoid the 'Optimize for speed' setting and choose
Outline for font downloading. These options can be found under the
Advanced button.</p>
<p>Other possibilities are the TpX and wmf2eps programs, which both
have options to write clipboard contents to an emf file. Wmf2eps
uses a printer driver in the background. For faithful conversion,
pick wmf2eps; for subsequent editing, choose TpX. Both programs are
availbable from <a href="http://www.tug.org/ctan.html">CTAN</a>.</p>
<h2>Command-line use</h2>
<p>Epspdf.rb, the library for epspdftk.rb, does double duty as
command-line version of epspdftk.rb. Type <tt>epspdf.rb -h</tt> for
help. It shares configuration settings with epspdftk.</p>
<h2>Troubleshooting</h2>
<h3>Grayscaling fails</h3>
<p>See above, under <a href="#gray">Grayscaling.</a> Epspdf is
limited by what can be done by the backend tools, i.e. Ghostscript
and pdftops.</p>
<h3>Part of the graphic gets cut off</h3>
<p>I have seen this happen with eps files generated by printing
landscape PowerPoint slides to PostScript with the Encapsulated
PostScript output option. Using the Archive output option instead
solved the problem. In general, experiment a bit in generating
your PostScript.</p>
<h3>Resources for troubleshooting</h3>
<p><i>Logfile.</i> Epspdf and epspdftk maintain a log file
epspdf.log in your home directory or, in case of Windows, your
profile directory. This profile directory may be c:\Documents and
Settings\<your user name>. Otherwise, open a DOS box and type
'<tt>echo %USERPROFILE%</tt>', which will produce this
information.</p>
<p>This logfile lists all Ghostscript- and pdftops program
calls plus error information. 'EPCallError' is probably a program
error. 'EPSystemError' is more likely caused by a faulty file, but
may be a program error as well.</p>
<p><i>Temporary files.</i> The temporary files may give clues as
well. They will be deleted at the end of the session (for the
command-line version, give a -d parameter to keep the temporary
files). Check the logfile which temporary files have been
created.</p>
<h3><a href="index.html">Main page...</a></h3>
<hr/>
<p class="fineprint">Last revised: Noverber 20, 2006</p>
</body></html>
|