Technical article 127116

How to create pdf files from ascii files?

OpenServer 6.0.0UnixWare 7.1.4

Written · Last revised

Problem

I want to convert a normal text file into a pdf file on my SCO Operating System. How can I do this?

Solution

Make sure that you have installed the latest PERL version on your system.

It has to be at least >=5.6.0.

The latest PERL version comes with the latest Maintenance Pack.

To check the version please run:
# perl -v

You will also need two additional PERL Software Modules:

1) PDF::API2
   ---------
You can download it from here:
http://search.cpan.org/dist/PDF-API2/lib/PDF/API2.pm

Download it to /tmp. Unzip and untar it. Now change directory to:

# cd /tmp/PDF-API2-0.71.001
and run:
# perl Makefile.PL
# make
# make install
2) a2pdf source
   ------------
You can download it from here:
http://perl.jonallen.info/projects/a2pdf

Download it to /tmp. Unzip and untar it. Now change directory to:

# cd /tmp/a2pdf-1.13
and run:
# perl Makefile.PL
# make
# make test
# make install

Make sure that the executable 2apdf is in your $PATH.

For Unixware7 add /opt/bin to your $PATH.

Now you can run:
# a2pdf  "ascii file" > "pdf file"
NOTES:    To take advantage of all features of a2pdf it may be
          necessary to install a couple of other PERL modules.

So for example to use Perl syntax highlighting you need to install Perl::Tidy.

You will get it from here:
http://perltidy.sourceforge.net/

From the Xinuos technical article database, record 127116. Reproduced with permission. The original is at www.sco.com/ta/127116, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.