Problem
I have received a PDF file and I want to print it out using command-line utilities on SCO OpenServer or UnixWare 7.
Solution
The unsupported OpenSource package Xpdf, which allows viewing and printing of PDF files in a graphical environment, also furnishes the following command-line utilities:
pdftops -- converts PDF files to PostScript pdftotext -- converts PDF files to plain text
These utilities can be used to print a PDF file called "foo.pdf" using the Unix lp print spooler as follows:
pdftops foo.pdf - | lp -o post (for PostScript output)
pdftotext foo.pdf - | lp (for plain text)Note: the above assumes that your printer is configured with an interface that recognizes the "-o post" option to process PostScript output, and that you wish to print to the default lp destination.
NOTES: The latest version of Xpdf, as of this writing, for both
OpenServer and UnixWare 7 is 0.92. You can get Xpdf
from the following ftp locations:For OpenServer5:ftp://ftp2.sco.com/pub/skunkware/osr5/x11/viewers/xpdfFor UnixWare7/OpenServer6:ftp://ftp2.sco.com/pub/skunkware/uw7/x11/viewers/xpdfThe Xpdf package also furnishes man pages for the above utilities, where further useful options to these commands can be explored.
You should also download install the freetype-1.3.1.pkg as this will contain the required graphical libraries that xpdf needs to run.
Also, starting with OpenUNIX 8.0.0 (UnixWare 7.1.2) and 7.1.3, if you are running LKP (Linux Kernel Personality), a Linux-based PDF viewer is available for use in Linux mode:
See: http://www.foolabs.com/xpdf/download.htmlNOTE: You should be able to view your XPDF documents in Mozilla as long as
the "mozplugger" plug-in is installed with the version of Mozilla you
are using. This is the case from Mozilla v1.7.12 onwards.To change the behaviour of "mozplugger" and get it to open a xpdf document within an active browser window rather that a separate xpdf instance:
Edit the the file mozpluggerrc in /opt/mozilla and changed line 228:
from: repeat noisy swallow(Xpdf) fill: xpdf -g +9000+9000 "$file"
to: repeat noisy swallow(xpdf) fill: xpdf "$file"NOTE: If your PDF file won't display then a later XPDF may be needed.OpenSource software is not supported by SCO, however, if you are using LKP then it would be possible to download a later Linux version as the xpdf binary contains statically linked libraries so that it can be run in the UnixWare7 namespace.
Download from: ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02-linux.tar.gzinto the Linux namespace, ie.# linuxand follow the installation instructions in the README and INSTALL files.
Once installed you can run the binary from an X Terminal Windows with:
# xhost +
# /linux/usr/local/bin/xpdf <file>.pdfThis can be "plugged" into Mozilla. However, ensure that the PDF
files are read from a "lxuwfs" filesystem otherwise Mozilla will not
be able to display the file, as it needs to "chroot" into the linux
namespace to do this.Also, to run without needing to use "xhost +" then:
Add the line "/usr/bin/X11/xhost + " to the top of the file:
/usr/dt/bin/Xsession See also
The 'ghostscript' package is a stock package provided by SCO which
has pdf utilities. It does not require the use of postscript, that
is simply one of the more common pdf conversion utilities contained
in this package. It also contains utilities to convert text and
other image formats to pdf.Alternatively, to generate your PDF files then this is possible, however, the following tools are not provided by or supported by SCO:
Visit:http://www.sanface.com/txt2pdf.htmlhttp://www.sanface.com/txt2pdf.html#downloadDownload the product, unzip or gunzip it, assuming you have obtained these packages for free from
http://www.sco.com/skunkwareand run:# unzip txt2pdf.zip
# cd txt2pdf-9.1
# ./txt2pdf.pl /etc/hostsWill generate /etc/hosts.pdf which can be read either by the SCO OpenSource XPDF or by Adobe Acrobat.