Hi Bob,
I can't figure out how to attach the text2pdf.exe file to this message, so if you can reply with your email address I'll attach it to an email (it's a tiny file but I would ZIP it before sending it as some mail filters object to executable files being sent in emails). If you run it from the command line (e.g. Windows PowerShell), you can give it the "-h" flag to see the help which then shows this:
text2pdf [options] [filename]
text2pdf makes a 7-bit clean PDF file (version 1.1) from any input file.
It reads from standard input or a named file, and writes the PDF file
to standard output.
There are various options as follows:
-h show this message
-f<font> use PostScript <font> (must be in standard 14, default: Courier)
-I use ISOLatin1Encoding
-s<size> use font at given pointsize (default 10.0)
-p<padding> add horizontal character padding (default 0.0)
-v<dist> use given line spacing (default 12.00 points)
-l<lines> lines per page (default 60, determined automatically
if unspecified)
-c<chars> maximum characters per line (default 80)
-t<spaces> spaces per tab character (default 8)
-F ignore formfeed characters (^L)
-A4 use A4 paper (default Letter)
-A3 use A3 paper (default Letter)
-x<width> independent paper width in points
-y<height> independent paper height in points
-2 format in 2 columns
-L landscape mode
-a left margin (default 50)
-b top margin (default 40)
Note that where one variable is implied by two options, the second option
takes precedence for that variable. (e.g. -A4 -y500)
In landscape mode, page width and height are simply swapped over before
formatting, no matter how or when they were defined.
text2pdf v1.1 (c) Phil Smith, 1996
So an very example of how to use it would be, given a plain ASCII text file (note that ^L = char(12) is treated as a new page):
c:\path\to\text2pdf mytextfile.txt > mytextfile.pdf
As I said, this is very rudimentary but does the job and offers enough options to format the output on a page. If I need further changes to the PDF created by this I use an open source product called "qpdf".
------------------------------
Martin Shields
Senior Technical Consultant
Meier Business Systems PTY LTD
Carnegie VIC AU
------------------------------
Original Message:
Sent: 04-18-2024 16:18
From: Bob Thomson
Subject: Text to pdf conversion
Sounds great - can you send me a copy?
------------------------------
Bob Thomson
President
Synapse Computer Solutions Inc
San Rafael CA US
Original Message:
Sent: 04-18-2024 16:08
From: Martin Shields
Subject: Text to pdf conversion
From the ensuing discussion I assume you're on Windows.
I have a very small, very crude program that was originally written in 1996 that will take text and create a PDF (it is called text2pdf and it runs on Windows, Linux, and MacOS, and probably can be compiled with little trouble for any other OS you might like to try!). It does no fancy formatting, it doesn't even produce a compressed PDF at the end, but it will produce a PDF from text if that's all you need.
Beyond this there are many options available I'm sure, but I avoid using Windows so can probably only offer further thoughts for *nix systems!
------------------------------
Martin Shields
Senior Technical Consultant
Meier Business Systems PTY LTD
Carnegie VIC AU
Original Message:
Sent: 04-17-2024 18:37
From: Bob Thomson
Subject: Text to pdf conversion
Can anyone recommend a test-to-pdf conversion program that I can run at the command line?
- Bob
------------------------------
Bob Thomson
President
Synapse Computer Solutions Inc
San Rafael CA US
------------------------------