LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create pdf from text files (https://www.linuxquestions.org/questions/linux-newbie-8/create-pdf-from-text-files-881431/)

TOC56 05-18-2011 11:09 AM

Create pdf from text files
 
Can anyone point me to a well working peace of software (free will be preferred) that can convert text-files into pdf.

Hangdog42 05-18-2011 11:15 AM

Libre Office does that quite nicely.

And welcome to LQ!

ButterflyMelissa 05-18-2011 11:17 AM

Hi, LibreOffice does that, and it's free...open your text, set it up right-n-nicely, hit "file" and "export as pdf"...

Works like a charm

odin_ago 05-18-2011 12:35 PM

Maybe, OpenOffice.org

//reply from anoher newbie

TOC56 05-19-2011 01:18 AM

Start from a script
 
Quote:

Originally Posted by Hangdog42 (Post 4360040)
Libre Office does that quite nicely.

And welcome to LQ!

I also need this to be done in background, initiated by a script.
Actually the linux runnings this does not have a gui at all.

Hangdog42 05-19-2011 07:02 AM

Quote:

Originally Posted by TOC56 (Post 4360611)
I also need this to be done in background, initiated by a script.
Actually the linux runnings this does not have a gui at all.


I was wondering if that was the case. Obviously, txt2pdf is the easiest way, but that isn't free, so I'm guessing you ruled that out. Other than that, I'm not aware of anything to do it in a single step, but you can do it as a two-step process. You could use enscript to convert the files to postscript files and then use ps2pdf to convert the postscript files to pdf.

There also might be a way to print to the CUPS pdf printer (Libre Office does have a command line interface). This (although rather old) gives you a rough idea of how you might do this. I'll do some more digging and see if I can find something cleaner.

teckk 05-20-2011 02:16 PM

http://perl.jonallen.info/projects/a2pdf

http://bulldog.tzo.org/ascii2pdf/ascii2pdf.html


All times are GMT -5. The time now is 01:43 PM.