ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Looking for freeware command line text to PDF

<< < (2/2)

4wd:
As long as your text is formatted beforehand, (it will truncate lines that don't fit your chosen output dimensions), then txt2pdf, (just another of many), is lightweight and fast.

TXT2PDF
TXT2PDF is a command-line tool for encoding ASCII as PDF. See the "ReadMe" file included with the zip for options and usage.

Example of calling TXT2PDF:

   txt2pdf -i"C:\temp\my ASCII file.txt" -o"C:\temp\pdfout.pdf" -w17 -h11
In this example, txt2pdf reads a file ("my ASCII file.txt") and writes it to a pdf ("pdfout.pdf"). The "-w" switch defines the page width as 17 inches; the "-h" switch defines the page height as 11 inches. Note that there are no spaces bewteen the flags and the associated parameters. See the ReadMe file for details.
--- End quote ---

wraith808:
As long as your text is formatted beforehand, (it will truncate lines that don't fit your chosen output dimensions), then txt2pdf, (just another of many), is lightweight and fast.

TXT2PDF
TXT2PDF is a command-line tool for encoding ASCII as PDF. See the "ReadMe" file included with the zip for options and usage.

Example of calling TXT2PDF:

   txt2pdf -i"C:\temp\my ASCII file.txt" -o"C:\temp\pdfout.pdf" -w17 -h11
In this example, txt2pdf reads a file ("my ASCII file.txt") and writes it to a pdf ("pdfout.pdf"). The "-w" switch defines the page width as 17 inches; the "-h" switch defines the page height as 11 inches. Note that there are no spaces bewteen the flags and the associated parameters. See the ReadMe file for details.
--- End quote ---
-4wd (August 03, 2019, 08:05 AM)
--- End quote ---

That's the same name as the utility quoted in the original post.  Is it the same utility?  Or just another by the same name?

x16wda:
Two completely different products:

08/03/2019  09:10 AM            25,130 txt2pdf.zip
08/03/2019  10:52 AM           852,893 verypdf-free-txt2pdf.exe

Neither is blocked for me, and VirusTotal does not complain about either.

4wd:
That's the same name as the utility quoted in the original post.  Is it the same utility?  Or just another by the same name?-wraith808 (August 03, 2019, 09:25 AM)
--- End quote ---

The OP references a post by me which includes a quote by jity2 which mentions "txttopdf.exe" - different name, (txt2pdf not mentioned in that whole thread - typo or mis-link?).

There are multiple versions of executables called txt2pdf including this one from Sourceforge but it puts up a requester when it finishes which makes it unsuitable for CLI batch use.

The one I linked is just a search result, (that I tested against a few files), that lets you also specify a few output options that should cover the majority of cases for simple text conversion.  As a bonus its website tested clean against VirusTotal.

In theory, you could do it all using PowerShell, for example, this code from TechNet, but I could only get it to produce blank PDFs and after staring at it for 30 minutes and not being able to work out what the hell was happening, decided it was easier to use the results of the Google search :-\ ... why reinvent the wheel?

Navigation

[0] Message Index

[*] Previous page

Go to full version