|Compiling with gcc 2.95|
Xpdf should compile cleanly with gcc 2.95.
However, it seems that many vendor-supplied X include files, as well as the stock X11 release, will not compile under C++ with gcc 2.95. You can work around this by using the -fpermissive gcc flag:
setenv CXXFLAGS -fpermissive ./configure make
(If you're running sh/bash/etc. use "export CXXFLAGS=..." instead of "setenv CXXFLAGS ...".)
Thanks to Rob Ginn for pointing out that -fpermissive takes care of this problem.
|VMS file format|
If you're running xpdf under VMS, and getting "Couldn't read xref table" errors, try converting the PDF file to plain fixed record format with no record attributes:
$ SET FILE/ATTRIBUTE=(LRL:512,MRS:512,ORG:SEQ,RAT:NONE,RFM:FIX)
This problem is most often caused by Netscape, which writes everything in stream_lf format.
(Thanks to Henry Juengst and Patrick Moreau for this hint.)
|VMS foreign symbol|
After installing xpdf on a VMS system, you need to define the xpdf
foreign symbol. Load your
$ xpdf :== $disk:[directory_path]xpdf.exe
After saving your modified login.com file, issue the command:
to force a re-execution of the login.com (or create another decterm), and you will be able to use xpdf.
On OpenVMS 7.x a system manager (or user) could also define a logical DCL$PATH, e.g.,
$ASSIGN/SYSTEM/EXECUTIVE_MODE SYS$SYSTEM:,DECW$UTILS: DCL$PATH
in SYS$STARTUP:SYSTARTUP_VMS.COM and then drop applications like XPDF into DECW$UTILS: or into another directory, which should be part of the (DCL$PATH) list.
(Thanks to Patrick Moreau and Henry Juengst for this hint.)
|gzip not found|
If you're running the command line tools under Windows and getting error messages that look something like this:
Error (5603): Couldn't execute 'gzip -d -q \s8i..Z' The name specified is not recognized as an internal or external command, operable program or batch file.
then you need to install gzip, available from www.gzip.org, and make sure it's on your executable search path.
|Printing multiple pages per sheet of paper|
You can use pdftops in conjunction with the tools in the psutils collection. For example, to print a PDF file, two pages per sheet:
pdftops foo.pdf - | psnup -2 | lpr
You can also use printing commands inside xpdf by specifying a print "file" that starts with a pipe character:
| psnup -2 | lpr
|Compiling with FreeType 2|
There are a few common problems encountered when compiling Xpdf with FreeType 2. The symptoms are weird compile errors that appear to be related to FreeType ("FT_Error not declared", syntax errors in FreeType include files, etc.)
FreeType 2 requires two different directories on the include path. For example, if you have FT2 installed in /usr/local, you'll need "-I/usr/local/include" (for <ft2build.h>) and "-I/usr/local/include/freetype2" (for <freetype/*.h>). The Xpdf configure script doesn't provide any way of setting two different include directories for FT2.
It gets worse... If you also have FreeType 1 installed in (for example) /usr/local, the /usr/local/include/freetype2 directory must be searched before /usr/local/include (because FT1 installs /usr/local/include/freetype/*.h, and has many file names in common with FT 2 - these get loaded instead of the FT2 files).
You may also have FreeType 1 or an older version of FreeType 2 installed somewhere else on the standard include search path (typically /usr/X11R6/include on Linux systems). This can cause the same sort of problems.
I haven't come up with a clean solution for this. There are two kludges:
1. You can create a link for ft2build.h:
cd /usr/local/include/freetype2 ln -s ../ft2build.h
2. You can set CFLAGS and CXXFLAGS on the command line before you run configure:
setenv CFLAGS "-I/usr/local/include/freetype2 -I/usr/local/include" setenv CXXFLAGS "-I/usr/local/include/freetype2 -I/usr/local/include" ./configure make
(If you're running sh/bash/etc. use "export CFLAGS=..." instead of "setenv CFLAGS ...".)
You'll need to adjust those paths to match your FreeType 2 installation.