txt2pdf

developed by © SANFACE Software

Version 3.4 15th May 2000

Contents

In Association with Amazon.com

txt2pdf PRO is out!!! Try it!!!

txt2pdf rate at LinuxBerg is 5 Penguins!
SANFACE Software logo
txt2pdf rate at Tucows Macintosh and BeOS is 5 Cows!

txt2pdf is pick at CNET Download.com
This means it's inside the CNET Downloads' selections
of the best available Linux software!

txt2pdf is !Muy Bueno! at Shareware Intercom Macintosh


What is txt2pdf?

txt2pdf is a very flexible and powerful PERL5 program. It's a converter from text files to PDF format files. With 2.x family you can put your text on white PDF pages. With 3.x you can create a layer beneath and above your text (background, foreground), where you can insert phrases or designs (using PDF syntax)
View the power of txt2pdf on the net!
Create your Peter Pan PDF on the fly! with Alex Catalogue
Read the PDFzone.com article on the project!


Why do you need txt2pdf?
Getting txt2pdf, Licence and Registration

txt2pdf is shareware
The txt2pdf source code is our company core business.
We trust you.
You can freely redistribute (without modify it) txt2pdf tool in its unregistered archive format (zip or tar.gz)
You can test text2pdf and modify it.
We'll send you a free registered copy for a good idea or txt2pdf modify.

You can't use a modify version of txt2pdf for production purpose.
You can't resell txt2pdf or a modify version of it without SANFACE Software authorization.
You can't copy part of it to include in your source without SANFACE Software authorization.

The txt2pdf sorce code tar.gz (last 3.x version)
The txt2pdf source code zipped (last 3.x version)
The txt2pdf 2.5 source code tar.gz
The txt2pdf 2.5 source code zipped
You can get the txt2pdf source code from www.pdfstore.com, too
If you need Mac hqx archive format you can find it at every Tucows Mac site.
If you need the RPM packadge you can find the version generated by Rufus T Firefly at https//www.idrive.com/sanface

We like PERL and we distribute txt2pdf in perl source
Probably you don't like it or you don't want to install it or ...
At etxt2pdf page (etxt2pdf mean Executable txt2pdf) you'll find the Windows version and now also the Linux and the Solaris executable version.
We can also create executable for BSDOS, IRIX, HP-UX, AIX, and FreeBSD but we can't test them.

txt2pdf 3.4 is shareware. The registration fee is $55 (US) every installation.
Buy five licences or more and save $15 every licence ($40)!
DescriptionPayment Options
Register NOW txt2pdf 3.x via a SECURE SERVER at www.RegSoft.COM SECURE MasterCard, VISA,American Express, Check, Fax, Voice
You can buy it also at PDFStore!
Register NOW txt2pdf 3.x via a SECURE SERVER at www.PdfStore.COM

The upgrade from txt2pdf 2.5 to txt2pdf 3.x is only $25 (US) every installation (for every licence registered before 1st January 2000).
txt2pdf 2.5 is shareware. The registration fee is $25 (US) every installation.
Buy five licences packet, one is free!
DescriptionPayment Options
One licence
Register NOW txt2pdf 2.x via a SECURE SERVER at www.RegSoft.COM
Register NOW txt2pdf 2.x via a SECURE SERVER at www.PdfStore.COM
Five licences
Register NOW 5 txt2pdf 2.x via a SECURE SERVER at www.RegSoft.COM
SECURE MasterCard, VISA,American Express, Check, Fax, Voice
If you want to register 10 o more licences contact SANFACE Software.
Remember: SANFACE Software is going to give you a free licence for every good idea or for every good modify.

Year 2000 Compliance

txt2pdf is a PERL script.
We use inside our code the correct method like suggested by the nice article Year 2000 Compliance

See the example:

    $then = time() + ( 60 * 60 * 24 * 365 * 5 );  # 5 years from now
    $that_year = localtime($then) -> year;

    printf("It shall be 19%d\n", $that_year);		# WRONG! 19103
    printf("It shall be %d\n", 1900 + $that_year);	# right:  2003
Installing txt2pdf
  1. Create your personal txt2pdf.cfg file.
    You can change the value of tmpdir, author, creator, keywords, subject, title, paper, landscape, font, cols, lines, tab, pointSize, vertSpace, yellow, red, green, blue, bold, italic, bo_it, columns2, npage, border, allowinparse, beginfile, endfile, bgdesign, fgdesign, transition, pagemode, pagelayout and typencoding variables.
    With tmpdir you can set the directory for the temporary files. You can use relative and absolute path. Default is ./
    It's better if you use the specific temporary directory of your system

          e.g. /tmp/                          on UNIX systems
               /temp/                         on Windows systems
               /desktop folder/temp           on MacOS
               /sys$scratch/ or SYS$SCRATCH   on OpenVMS
    
    With author, creator, keywords, subject, title you can set the relative fields of PDF Info dictionary that provides information about the document.
    AuthorThe name of the person who created the document
    CreatorIf the document was converted into a PDF document from another form, this is the name of the application that created the original document
    KeywordsKeywords associated with the document
    SubjectThe subject of the document
    TitleThe document's title
    If the value of author, creator, keywords, subject is not known there are omitted. If the value of title is null, the file name is introduced.
    The default paper value is letter. You can use also A3 (or a3), A4 (or a3), A5 (or a5), tabloid, ledger, legal, statement, executive, widthxheight
    Default is portrait, if you want to swap to landscape you have to set landscape variable to 1 (Default 0).
    With cols you can set max chars per output line (default 80)
    With lines you can set max lines per output page (default (pageHeight-72)/vertSpace, pageHeight depends from paper select)
    With tab you can set the number of white space char for every tab (default 8)
    The default font value is Courier. You can use also Helvetica or Times
    With pointSize you can set the font point size (default 10)
    vertSpace is the distance between two lines (default 12)
    With yellow, red, green, blue you can set a file where you can list words you want to be colored yellow, red, green, blue in PDF output file.
    With bold, italic and bo_it you can set a file where you can list words you want to be marked bold, italic or bolditalic in PDF output file.
    Setting columns2 : 1 you can configure the conversion to 2-columns PDF files.
    Setting npage : 1 you can add page number in every page
    Setting border : 1 you can add a border in every page
    With transition variable you can use these parameters: Note: PDF format supports only the described transition values
    Setting allowinparse : 1 you can allow the parse
    With beginfile and endfile you can set a file where you can add the text you want to be added at the beginning or at the end of every file.
    With bgdesign and fgdesign you can set a background or foreground file. Inside you can use directly PDF syntax.
    Setting pagemode : FullScreen the Acrobat Reader will open your document in full-screen mode. In full-screen mode, there is no menu bar, window controls, nor any other window present.
    The default pagelayout value is single page. You can use OneColumn (Display the pages in one column), TwoColumnLeft (Display the pages in two columns, with odd-numbered pages on the left), TwoColumnRight (Display the pages in two columns, with odd-numbered pages on the right)
    With typeencoding you can select the correct encoding for your OS: WinAnsiEncoding, MacRomanEncoding, MacExpertEncoding, PDFDocEncoding are supported. The default is for Unix

  2. How to configure yellow, red, green, blue and bold, italic, bo_it files.
    In these files you can insert a word list with PERL regular expression rules.
    e.g. if you introduce in red.cfg the word end, every word in the input file what contains end will become red in PDF output file. If you introduce ^end$, only the end word will become red.

  3. Inside beginfile and endfile files you can use the a few markers that you can enable with the option allowinparse.
    This is the list

    You can insert one inside another e.g. [!red] [!italic] Red italic begin file [!/italic] [!/red]
    Remember:

  4. Inside bgdesign and fgdesign files you can use directly the PDF syntax to design and to write
    These are a few examples:
    If you want to put on every generated page a bold big diagonal DRAFT, you can use the foreground file with

          /F3 55 Tf
          .5 .5 -.5 .5 150 455 Tm
          (DRAFT) Tj
    
    /F1 means use the selected font in normal way, /F2 italic, /F3 bold, /F4 bolditalic
    55 is the point size.
    The meaning of the first line is: use the bold selected font with point size 55.
    The meaning of the second line is: start form point (150,455) and write diagonal.
    The meaning of the third line is: write DRAFT.
    If you want to design like background a border line black inside grey, you can use the background file with
          .9 g
          0 G
          3 w
          25 25 545 792 re
          B
    
    The meaning of the first line is: inside the rectangle use grey (0 is black, 1 is white)
    The meaning of the second line is: the line is black
    The meaning of the third line is: the width of the line is 3
    The meaning of the fourth line is: the rectangle is (25,25) (545,792)
    The meaning of the fiveth line is: design

    You can find the information about the PDF syntax you can use in the layers directly in The PDF Reference Manual Version 1.3 PDF (518 pages, ~5 Mb) in the Chapter 8 (Page Descriptions).

  5. Try to start txt2pdf. Enter in Tests directory and digit:
    ../txt2pdf -c test.cfg test.txt
    test.pdf is the PDF output file
    On Unix OS, a simple STDIN and STOUT test is
    ls -l | txt2pdf - > ls.pdf
    On Windows OS
    dir | perl txt2pdf - > dir.pdf
Syntax

txt2pdf [-options] files
where options include:
    -help                        print out this message
    -configure file              default txt2pdf.cfg
    -landscape
    -2                           format in 2 columns
    -paper format                default letter, valid formats: A3 (or a3),
                                 A4 (or a4), A5 (or a5), widthxheight
    -npage                       add page number
    -recursive directory         scan recursively the directory
    -match     files             match different files ex. *.pdf, a?.*
                                 (require -recursive option)
    -border                      border line
    -allowinparse                parser
    -verbose                     verbose
    -                            use STDIN and STOUT

list:
    with list you can use metacharacters and relative and absolute path name
Other Features

Multiuser Features

A system manager can install txt2pdf and provide a default .cfg file for his users/organization

setenv TXT2PDFCFG /wherever/default.cfg Unix in csh.cshrc for example
define/system TXT2PDF wherever:default.cfg VMS in SYLOGIN.COM for example
A user can still overwrite the value using another setenv or define command in his own .cshrc/login.com if he wants to have a default file of his own.
A user can still have a working directory with a txt2pdf.cfg file and have it loaded if exists. This allows him (without command line option) to setup fully functional working directories.
He can also (as he wishes) use the -configure option to overwrite any defaults.

Multilanguage Features

Read the Cyrillic note in the contributed directory from Ilya Naumov.
Probably in the same way txt2pdf can work also with Greek, ...
Write us about your tests with txt2pdf and multilanguage! We'll give you a free licence for every important information

Contributed programs

!txt2pdf is a RiscOS frontend for txt2pdf [from Joern-Erik LEO Burkert]
Requires: JFShared-Library by Justin Fletcher, !Perl for RiscOS and txt2pdf
You can find it in the contributed/Acorn-Risc directory or directly at LEO's RisOS-page
See a screenshot of the program
We're looking for contributed frontends: Java, GTK, pTK, VB.

Text-Flowchart is 'ASCII Flowchart maker' perl module created by Jim Thomason. You can find it in contributed directory or at CPAN.
See this text Flowchart and its PDF convertion via txt2pdf (you can also find these examples in the Tests/flowchart directory).

What's new in this version

Here you can find an exhaustive history file

Links around the world to txt2pdf