The program is actually very simple to use. All you normally do is
text2pdf myfile > myfile.pdf.
I found it here and created attached source package in which a static linked bin [40k] is included.
text2pdf
text2pdf
- Attachments
-
- text2pdf-1.1.tar.gz
- source and static linked bin
- (27.72 KiB) Downloaded 186 times
-
- Posts: 1543
- Joined: Mon 22 Feb 2016, 19:43
Thanks for testing! There are some switches to control output - "text2pdf -h" will show:
I wanted a really cheap text2pdf-printer for some of my text-editors - so created below script named "lpr" in /bin:
Above might not be universal usable - adjust for your own needs.
Code: Select all
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)
-v<dist> use given line spacing (default 12 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
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.
Code: Select all
#!/bin/sh
FILE=$(echo ${@} | cut -d " " -f3)
DESTFILE=$(basename ${FILE})
if [ -f ${FILE} ]; then
text2pdf ${FILE} > /$HOME/${DESTFILE}.pdf &
else
echo file not found
fi
exit
- OscarTalks
- Posts: 2196
- Joined: Mon 06 Feb 2012, 00:58
- Location: London, England
Maybe that's the problem. I didn't include the source .c file when I dragged it into the /bin directory. Do I need to?
Also, I can see where it would be helpful, especially for batch processing but you know Libre-Writer converts to PDF and you can call it via terminal. You can also call ABI Word to do something similar and might, in fact be the best use of the ABI product these days...
Also, I can see where it would be helpful, especially for batch processing but you know Libre-Writer converts to PDF and you can call it via terminal. You can also call ABI Word to do something similar and might, in fact be the best use of the ABI product these days...
Last edited by slavvo67 on Sat 11 Feb 2017, 19:29, edited 2 times in total.
Recent versions of mtpaint have a feature where the app lists all the
fonts that are available and the name that the system uses to call them.
I believe it's under the edit menu heading.
It might be useful to look there.
Here is where I selected a font for mtpaint scripting
http://www.murga-linux.com/puppy/viewto ... 266#893266
_____________________________________________________
fonts that are available and the name that the system uses to call them.
I believe it's under the edit menu heading.
It might be useful to look there.
Here is where I selected a font for mtpaint scripting
http://www.murga-linux.com/puppy/viewto ... 266#893266
_____________________________________________________