Author: Fabrizio Pivari

PDFprint
### Version 2.5 10th May 1998
Programming by | Fabrizio Pivari <pivari@geocities.com>
Documentation by | Fabrizio Pivari <pivari@geocities.com>
What is PDFprint
PDFprint is a very flexible tool to print PDF files (or parts of them) from different directories and recursively from every subdirectories (in the future, from FTP and HTTP sites) to a printer or to the monitor, in PostScript format or in text format. |

PDFprint can also help you to print PostScript files (or parts of them) from different directories and recursively from every subdirectories (in the future, from FTP and HTTP sites) to a printer or to the monitor, in PostScript format or in text format.
PDFprint can also help you to print HTML files (or parts of them) from different directories and recursively from every subdirectories (in the future, from FTP and HTTP sites) to a printer or to the monitor, in PostScript format or in text format.

PDF problems

How can you print the first page of every PDF file, starting with "a" letter, in your archive?
How can you read, in ascii mode, the first page of every PDF file in your archive?
How can you print every PDF file in your archive 2-up or 4-up?
At the moment, if you want to print a PDF file you need a tool that converts it in PostScript format (level 3 PostScript printers will accept PDF format directly). Usually, the tool is a reader, so you need to visualize the PDF file, then the tool converts it in a PostScript file and sends the PostScript file to the printer.
With PDFprint you can solve these problems.

PostScript problems

How can you print the first and the fifth pages of every PostScript file in your archive?
How can you read, in ascii mode, every PostScript file in your archive?
How can you print every PostScript file in your archive 2-up or 4-up?
With PDFprint you can solve these problems.

HTML problems

How can you print every HTML file in your web 2-up or 4-up?
At the moment, if you want to print a HTML file you need a tool that converts it in PostScript format (level 3 PostScript printers will accept HTML format directly). Usually, the tool is a browser, so you need to visualize the HTML file, then the tool converts it in a PostScript file and sends the PostScript file to the printer.
With PDFprint you can solve these problems.

Getting and Installing PDFprint

1. Get the latest Version of PDFprint from:
   http://www.geocities.com/CapeCanaveral/Lab/3469/pdfprint.html or CPAN

2. Get and compile the xpdf software, inside you can find pdftops and pdftotext tools:
   http://www.aimnet.com/~derekn/xpdf/
   Also, you can use the option -toPostScript of Acrobat Reader or, if you have just compiled Ghostscript 5.xx, you can use pdf2ps script
   To use PDFprint with HTML files get HTMLDOC tool: http://www.easysw.com/~mike/htmldoc/
   To manipulate PostScript file, get and compile the psutils software, inside you can find psselect and pstops tools:
   http://www.dcs.ed.ac.uk/home/ajcd/psutils/
   If you have just compiled Ghostscript 5.xx, you can use ps2ascii script

3. Make sure you have Perl Version 5.003 or later on your system:
   http://www.perl.com/perl/info/software.html

4. Create your personal pdfprint.cfg file.
   You can change the value of tmpdir, converter, filter and print variables.
   With tmpdir you can set the directory for the temporary files. You can use relative and absolute path. Default is /tmp.
   With converter you can use pdf2ps, pdftops or acroread -toPostScript to convert PDF files to PostScript files, pdftotext to convert PDF files to ASCII files, HTMLDOC to convert HTML files to PostScript or PDF.
   You can use psselect or pstops to modify PostScript files to PostScript files ps2ascii to convert PostScript files to ASCII files.
   In acroread -toPostScript you can specify to convert to Level 2 PostScript (default is Level 1 PostScript) with -level2 option.
   In pdftops and pdftotext you can specify the pages to convert with the options

   - -f number the first page to convert
   - -l number the last page to convert
   In pdftops you can specify to convert to Level 1 PostScript (default is Level 2 PostScript) with -level1 option.
   In pdftotext you can specify to convert to 7-bit ASCII (default is 8-bit ISO Latin-1) with -ascii7 option.
   In HTMLDOC you can use these options:
   - -t ps1 to force Level 1 PostScript
   - -t ps2 to force Level 2 PostScript
   - -t pdf to force PDF
   - --size [sizepage] to specifies the oputput page size. You can use these sizepage: letter, a4, universal, WIDTHxHEIGHT, WIDTHxHEIGHTin, WIDTHxHEIGHTcm, WIDTHxHEIGHTmm
   In psselect you can use these options:
   - -r output the selected pages in reverse order
   - -ppages specifies the pages which are to be selected. Pages is a comma separated list of page ranges, each of which may be a page number, or a page range of the form first-last. If first is omitted, the first page is assumed, and if last is omitted, the last page is assumed.
   With filter you can use pstops to perform a large number of arbitrary rearrangements of Documents, including arranging for printing 2-up, 4-up, booklets, reversing, selecting front or back sides of documents, scaling, etc.
   With printer you can use printing commands like lpr and lp or monitor commands like more and pg.
   Every PDF or PostScript file, you have selected, is converted with the selected converter tool, then filtered with the selected filter tool (default is nothing) and then printed with the selected printer tool.
5. Try to start PDFprint. You can use the two test files in tests directory: pdfprint.pdf and pdfprint.ps. Type ./pdfprint ./tests/pdfprint.pdf or ./pdfprint ./tests/pdfprint.ps on the command line

Original external tools documentation

- HTMLDOC
- pdftops
- acroread
- pdf2ps
- pdftotext
- psselect
- ps2ascii
- pstops

Syntax

pdfprint [-options] files

    where options include:
        -help                        print out this message
        -verbose                     verbose
        -recursive directory         scan recursively the directory
        -match     files             match different files ex. *.pdf, a?.*
        -configure file              default pdfprint.cfg

    files:
        with files you can use metacharacters and relative and absolute path name
        only files with .pdf, .PDF or .ps, .PS extensions are accepted

    example:
        pdfprint *.pdf
        pdfprint -v -c tests/test.cfg */*.pdf
        pdfprint -m a* -r pdfdocs

What's new in this version

- Added support for htmldoc

Here you can find an exhaustive history file

Source

Source Code: the last release 2.5
You can also find the source code at CPAN authors/Fabrizio_Pivari/

Links around the world to PDFprint

- xpdf: a PDF viewer for X
- Ghostscript, Ghostview and GSview
- Emerge PDFzone - Adobe Acrobat-related Shareware & Freeware
- developer.com Perl:Utilities
- Linux Weekly News
- Luc Devroye's postscript page