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
------------------------------
Can anyone recommend a test-to-pdf conversion program that I can run at the command line?
- Bob
Can anyone recommend a test-to-pdf conversion program that I can run at the command line?
- Bob
Hi Bob,
if you are doing it from D3, then :
1. create the relevent printer for PDF (if not done already)
2. set your printer to the PDF "printer" / creator
3. enter COPY <file> <item> (p<other options>
If from Windows using a DOS command window :
Regards,
Warwick
Hi Bob,
if you are doing it from D3, then :
1. create the relevent printer for PDF (if not done already)
2. set your printer to the PDF "printer" / creator
3. enter COPY <file> <item> (p<other options>
If from Windows using a DOS command window :
Regards,
Warwick
I can print to a pdf in Windows. When I print from d3, at what point do I tell it what file to create?
Can anyone recommend a test-to-pdf conversion program that I can run at the command line?
- Bob
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!
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!
Sounds great - can you send me a copy?
Sounds great - can you send me a copy?
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, 1996c:\\path\\to\\text2pdf mytextfile.txt > mytextfile.pdfHi 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, 1996c:\\path\\to\\text2pdf mytextfile.txt > mytextfile.pdfbob@synapse-cs.com
Thanks!
bob@synapse-cs.com
Thanks!
Sent! Let me know here if it doesn't show up!
Sent! Let me know here if it doesn't show up!
I did not receive it. Try sending it to bobthomson2001@yahoo.com.
Thanks!
Hi Bob,
if you are doing it from D3, then :
1. create the relevent printer for PDF (if not done already)
2. set your printer to the PDF "printer" / creator
3. enter COPY <file> <item> (p<other options>
If from Windows using a DOS command window :
Regards,
Warwick
We have been using PCL2PDF software sucessfully for many years.
We use the same programs as to print to a PCL laser printer the report; but, we capture the print being generated.
Then use the command line as instructed to convert it to PDF
We have been using PCL2PDF software sucessfully for many years.
We use the same programs as to print to a PCL laser printer the report; but, we capture the print being generated.
Then use the command line as instructed to convert it to PDF
PCL2PDF creates the PDF file just fine, but it hangs up the d3 port it's running on. When I run it at the command line, it warns me this file is not in standard PCF format, and prompts me to click OK. How do I get it to exit gracefully?
- Bob
PCL2PDF creates the PDF file just fine, but it hangs up the d3 port it's running on. When I run it at the command line, it warns me this file is not in standard PCF format, and prompts me to click OK. How do I get it to exit gracefully?
- Bob
I don't recognize the PCL2PDF535 version of the command name. I've been using PCL2PDF.
It still works when I execute the command in the shell, but it hangs up when I run it in d3.
- Bob
Can anyone recommend a test-to-pdf conversion program that I can run at the command line?
- Bob
Hi Bob,
I needed a simple way to go from text to pdf a few years back and couldn't find a simple solution.
I did find a PS2PDF (Postscript) and was able to implement it.
I haven't really explored the postscript possibilities because a simple text PDF is fine for our needs, but I believe there are a wealth of possibilities.
a = @AM
v = @VM
c = CHAR( 13 ) : CHAR( 10 )
l = CHAR( 10 )
t = CHAR( 9 )
UnixPath = '/u/home/lance/'
OPEN UnixPath TO h_home ELSE STOP
heading = '""' ;! Page header - Left blank for my use
txt_name = 'Txt2Pdf-Test.txt'
ps_name = 'Txt2Pdf-Test.ps'
pdf_name = 'Txt2Pdf-Test.pdf'
report = 'Some data to write to text file' : c : 'With two lines of text.'
WRITE report TO h_home, txt_name
cmd = '!cd ' : UnixPath : l
cmd := 'enscript -b ' : heading : ' --margins=0:0:0:0 -f Courier10 -F Courier10 -p ' : ps_name : ' ' : txt_name : ' >/dev/null 2>&1' : l
cmd := 'ps2pdf ' : ps_name : ' ' : pdf_name : ' >/dev/null 2>&1' : l
cmd := 'cp -f ' : pdf_name : ' ' : pdf_name : ' >/dev/null 2>&1' : l
cmd := 'rm -f ' : txt_name : l
cmd := 'rm -f ' : ps_name : l
EXECUTE cmd CAPTURING abc
Hope this helps...
Lance
Hi Bob,
I needed a simple way to go from text to pdf a few years back and couldn't find a simple solution.
I did find a PS2PDF (Postscript) and was able to implement it.
I haven't really explored the postscript possibilities because a simple text PDF is fine for our needs, but I believe there are a wealth of possibilities.
a = @AM
v = @VM
c = CHAR( 13 ) : CHAR( 10 )
l = CHAR( 10 )
t = CHAR( 9 )
UnixPath = '/u/home/lance/'
OPEN UnixPath TO h_home ELSE STOP
heading = '""' ;! Page header - Left blank for my use
txt_name = 'Txt2Pdf-Test.txt'
ps_name = 'Txt2Pdf-Test.ps'
pdf_name = 'Txt2Pdf-Test.pdf'
report = 'Some data to write to text file' : c : 'With two lines of text.'
WRITE report TO h_home, txt_name
cmd = '!cd ' : UnixPath : l
cmd := 'enscript -b ' : heading : ' --margins=0:0:0:0 -f Courier10 -F Courier10 -p ' : ps_name : ' ' : txt_name : ' >/dev/null 2>&1' : l
cmd := 'ps2pdf ' : ps_name : ' ' : pdf_name : ' >/dev/null 2>&1' : l
cmd := 'cp -f ' : pdf_name : ' ' : pdf_name : ' >/dev/null 2>&1' : l
cmd := 'rm -f ' : txt_name : l
cmd := 'rm -f ' : ps_name : l
EXECUTE cmd CAPTURING abc
Hope this helps...
Lance
Unfortunately, I'm on d3/Windows.
- Bob
Hi Bob,
I needed a simple way to go from text to pdf a few years back and couldn't find a simple solution.
I did find a PS2PDF (Postscript) and was able to implement it.
I haven't really explored the postscript possibilities because a simple text PDF is fine for our needs, but I believe there are a wealth of possibilities.
a = @AM
v = @VM
c = CHAR( 13 ) : CHAR( 10 )
l = CHAR( 10 )
t = CHAR( 9 )
UnixPath = '/u/home/lance/'
OPEN UnixPath TO h_home ELSE STOP
heading = '""' ;! Page header - Left blank for my use
txt_name = 'Txt2Pdf-Test.txt'
ps_name = 'Txt2Pdf-Test.ps'
pdf_name = 'Txt2Pdf-Test.pdf'
report = 'Some data to write to text file' : c : 'With two lines of text.'
WRITE report TO h_home, txt_name
cmd = '!cd ' : UnixPath : l
cmd := 'enscript -b ' : heading : ' --margins=0:0:0:0 -f Courier10 -F Courier10 -p ' : ps_name : ' ' : txt_name : ' >/dev/null 2>&1' : l
cmd := 'ps2pdf ' : ps_name : ' ' : pdf_name : ' >/dev/null 2>&1' : l
cmd := 'cp -f ' : pdf_name : ' ' : pdf_name : ' >/dev/null 2>&1' : l
cmd := 'rm -f ' : txt_name : l
cmd := 'rm -f ' : ps_name : l
EXECUTE cmd CAPTURING abc
Hope this helps...
Lance
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.