Find the answer to your Linux question:
Results 1 to 4 of 4
I have a file1.txt file created by Notepad and I need a command line solution that can be run from a php script that will convert it to a file2.pdf. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    2

    text to pdf conversion


    I have a file1.txt file created by Notepad and I need a command line solution that can be run from a php script that will convert it to a file2.pdf. If there is a readymade routine to do this, can anyone please give me details and if possible the command line showing options for an A4 page size, 12 point Arial Font and for it to be encrypted, so that it needs a password before it can be edited? I have a Linux server running my website and this has to be done via a php script, with no human intervention. Thanks if anyone can help here, I'm a Linux Newbie!

  2. #2
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    use txt2pdf...first result for google when querying text to pdf.

    I've used dvi2pdf extensively with never a problem, so I assume this one will work just as well.
    Operating System: GNU Emacs

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    2
    Quote Originally Posted by genesus View Post
    use txt2pdf...first result for google when querying text to pdf.

    I've used dvi2pdf extensively with never a problem, so I assume this one will work just as well.
    sorry it only works on windows, not Linux - I tried it plus several more the same. Derek..

  4. #4
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    It says on their website that it can run on any system running perl:

    You can run txt2pdf on any system that runs PERL (we have customers that use txt2pdf on OpenVMS, MPE, ...) or you can use a binary version on Windows, Solaris, HP-UX, AIX, Linux, Mac OS X (if you're interested in a binary for another operating system, such as FreeBSD, SCO Unix, Irix, Digital Unix (tru64), please let us know, and we'll send you one).
    txt2pdf (text to pdf): to convert txt, text, textual report, spool to pdf
    oz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •