7 The Xpdf software and documentation are
8 copyright 1996-2007 Glyph & Cog, LLC.
10 Email: derekn@foolabs.com
11 WWW: http://www.foolabs.com/xpdf/
17 Xpdf is written in C++ (with a little bit of C). It should work with
18 any ANSI-compliant C++ and C compilers. The systems and compilers
19 it's been tested with are listed on the xpdf web page.
21 Xpdf requires the Motif (or Lesstif) toolkit.
23 The following notes give specific instructions for compiling on
31 * Install t1lib (if desired). The resulting library (libt1) and
32 include files (t1lib.h and t1libx.h) should be placed somewhere on
33 the standard search paths. Alternatively, when you configure xpdf,
34 you can use the following options to tell configure where to find
37 --with-t1-library=PATH
38 --with-t1-includes=PATH
40 * Install FreeType 2 (this is required). WARNING: You must have
41 version 2.0.5 or newer. Some older versions of XFree86 ship with an
42 older version of FreeType, which means you'll need to explicitly set
43 include and library paths to get the correct version:
45 --with-freetype2-library=PATH
46 --with-freetype2-includes=PATH
48 (The include path is the directory which contains the freetype2
49 directory, i.e., do NOT include "freetype2" in the
50 --with-freetype2-includes path. For example, with the default
51 installation, the library path is /usr/local/lib and the include
52 path is /usr/local/include/freetype2.)
54 * If you have Motif (or Lesstif) installed in a non-standard place,
55 you can use the following options to tell configure where to find
58 --with-Xm-library=PATH
59 --with-Xm-includes=PATH
61 * Run the configure script:
65 This should produce a set of makefiles customized for your system.
66 The configure script accepts the following options (in addition to
67 the usual things accepted by autoconf configure scripts):
70 Changes the directory where xpdf is installed. The default is
74 Switches the default paper size for PostScript output (xpdf
75 and pdftops) to A4. The default is Letter size.
77 --enable-no-text-select
78 With this option, xpdf will not copy text. (This is only
79 useful on closed systems where the user can't get at the PDF
83 Enables support for generation of OPI (Open Prepress
84 Interface) comments with pdftops.
87 Look for the system-wide xpdfrc config file in this directory.
88 The default is PREFIX/etc.
91 Use the specified app-defaults directory. The default is
92 /usr/lib/X11/app-defaults.
94 If you need to pass specific options to the C and/or C++ compiler,
95 you can set the CFLAGS and/or CXXFLAGS environment variables before
96 running the configure script. Any options given that way will be
97 added to the CFLAGS/CXXFLAGS used by all of the Xpdf makefiles.
99 * Type 'make'. This should build the executables:
109 * If desired, type 'make install' to install the binaries and man
112 The old Makefile.config and Makefiles are no longer provided or
113 supported. If you really want to manually configure Xpdf (which is
114 not recommended), the files that need to be created are aconf.h,
115 Makefile, goo/Makefile, fofi/Makefile, splash/Makefile, and
116 xpdf/Makefile, all of which are generated from the corresponding '.in'
119 If you want to run a quick test, there is a tiny PDF file included
120 with xpdf, as misc/hello.pdf .
127 * The 'stddef.h' include file which comes with older versions of gcc
128 may be missing a definition for wchar_t. In this case, add the
131 File GNU_CC:[INCLUDE]STDDEF.H;2
132 44 /* Wide characters, not yet supported by VAXCRTL [match VAXC's <stddef.
133 45 #if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
134 46 typedef unsigned int wchar_t;
141 * Read the instructions at the top of vms_make.com.
143 * Type '@vms_make' in the top-level directory. You'll probably want
144 to use some of the options described in the file.
146 * The executables will be left in '[.xpdf]'.
148 If you want to run a quick test, there is a tiny PDF file included
149 with xpdf, as misc/hello.pdf .
156 Xpdf is known to run under OS/2 with the EMX runtime environment and
157 XFree86. Using a proper autoconf port you can generate a valid
158 configure script version.
165 The non-X programs (pdftops, pdftotext, pdfinfo, pdffonts, pdfimages,
166 and pdftoppm) will compile with both gcc (from cygwin), djgpp (the
167 Delorie port of gcc) and Microsoft Visual C++.
169 With cygwin, the build procedure is the same as for Unix:
179 It is also possible to build the Xpdf viewer with the cygwin XFree86
180 port (thanks to Michael A. Richmond for these instructions):
182 * make sure you have the lesstif, XFree86-base, and XFree86-prog
183 cygwin packages installed (all from the "XFree86" category)
187 - ./configure --without-x
190 (this should install /usr/local/include/t1lib.h and
191 /usr/local/lib/libt1.a)
195 - ./configure --with-t1-library=/usr/local/lib
196 --with-t1-includes=/usr/local/include
197 --with-freetype2-library=/usr/X11R6/lib
198 --with-freetype2-includes=/usr/X11R6/include/freetype2
199 --with-Xm-library=/usr/X11R6/lib
200 --with-Xm-includes=/usr/X11R6/include
203 (this should build xpdf.exe, in addition to the command line
212 * djgpp is a DOS/Windows port of gcc, available from
213 http://www.delorie.com/
215 With djgpp, for DOS 6 (instead of Win32):
223 * exe2coff pdftops.exe
225 * copy /B c:\djgpp\bin\cwsdstub.exe+pdftops pdftops.exe
228 - if you want compressed executables
230 * and similarly for the other executables
232 * cwsdstub.exe comes from djgpp/v2misc/csdpmi5b.zip on any of the
233 djgpp ftp mirrors; exe2coff is part of the standard djgpp install
235 * upx comes from http://upx.sourceforge.net/
237 With the Microsoft tools:
241 * Type "cl". If you get the message "Bad command or file name", you
242 must run VCVARS32.BAT. (The location of this BAT file can be
243 determined with Explorer.)
247 The dj_make and ms_make scripts don't build pdftoppm -- you'll need to
248 install t1lib and FreeType 2 before you can compile pdftoppm.