D3 and mvBase

 View Only
  • 1.  Text to pdf conversion

    PARTNER
    Posted 12 days ago

    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
    ------------------------------


  • 2.  RE: Text to pdf conversion

    PARTNER
    Posted 11 days ago

    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 :

    1. in Windows, set the PDF printer / creator as your default
    2. in the DOS / CMD window enter  (I think)  PRINT <file>      where <file> can be the full path

    Regards,

    Warwick



    ------------------------------
    Warwick Dreher
    Warwick Dreher
    Croydon AU
    ------------------------------



  • 3.  RE: Text to pdf conversion

    PARTNER
    Posted 11 days ago

    I can print to a pdf in Windows.  When I print from d3, at what point do I tell it what file to create?



    ------------------------------
    Bob Thomson
    President
    Synapse Computer Solutions Inc
    San Rafael CA US
    ------------------------------



  • 4.  RE: Text to pdf conversion

    PARTNER
    Posted 10 days ago

    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



    ------------------------------
    Frank Diaz
    Consultant
    Compucot Inc
    Doral FL US
    ------------------------------



  • 5.  RE: Text to pdf conversion

    PARTNER
    Posted 11 days ago

    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!



    ------------------------------
    Martin Shields
    Senior Technical Consultant
    Meier Business Systems PTY LTD
    Carnegie VIC AU
    ------------------------------



  • 6.  RE: Text to pdf conversion

    PARTNER
    Posted 11 days ago

    Sounds great - can you send me a copy?



    ------------------------------
    Bob Thomson
    President
    Synapse Computer Solutions Inc
    San Rafael CA US
    ------------------------------



  • 7.  RE: Text to pdf conversion

    PARTNER
    Posted 11 days ago

    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, 1996
    So an very example of how to use it would be, given a plain ASCII text file (note that ^L = char(12) is treated as a new page):
    c:\path\to\text2pdf mytextfile.txt > mytextfile.pdf
    As I said, this is very rudimentary but does the job and offers enough options to format the output on a page. If I need further changes to the PDF created by this I use an open source product called "qpdf".


    ------------------------------
    Martin Shields
    Senior Technical Consultant
    Meier Business Systems PTY LTD
    Carnegie VIC AU
    ------------------------------



  • 8.  RE: Text to pdf conversion

    PARTNER
    Posted 11 days ago

    bob@synapse-cs.com

    Thanks!



    ------------------------------
    Bob Thomson
    President
    Synapse Computer Solutions Inc
    San Rafael CA US
    ------------------------------



  • 9.  RE: Text to pdf conversion

    PARTNER
    Posted 11 days ago

    Sent! Let me know here if it doesn't show up!



    ------------------------------
    Martin Shields
    Senior Technical Consultant
    Meier Business Systems PTY LTD
    Carnegie VIC AU
    ------------------------------



  • 10.  RE: Text to pdf conversion

    PARTNER
    Posted 11 days ago

    I did not receive it.  Try sending it to bobthomson2001@yahoo.com.

    Thanks!



    ------------------------------
    Bob Thomson
    President
    Synapse Computer Solutions Inc
    San Rafael CA US
    ------------------------------