Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
I am trying to figure out the following: Send formatted output to the printer, created from a script (perl,php,bash). Let's say I create a HTML template and substitute some placeholders ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Posts
    8

    Can someone point me in the right direction?


    I am trying to figure out the following:
    • Send formatted output to the printer, created from a script (perl,php,bash). Let's say I create a HTML template and substitute some placeholders with data and send the formatted output to the printer. I have tried this command:
      Code:
      lynx -dump template.html | lpr
      But I need to print graphics too.

      Print at a specific height and width, I don't even know how to explain this one, I had forms printed at the printer with my company name and what I'm trying to do here is to fill in the blanks on the form.


    Please guys, help me!!

  2. #2
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    If I remember right lynx does not support graphics...

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Posts
    8
    Quote Originally Posted by jaboua
    If I remember right lynx does not support graphics...
    That is why I need another solution, any idea as to how to print on premade forms?

  4. #4
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    i mean... there might be a way to harnass the gecko engine, but its not gonna be an easy script, it seems likely theres a program somewhere that was built for commandline conversions to postscript, and it seems even more likely they would support html.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  5. #5
    Just Joined!
    Join Date
    Jun 2005
    Posts
    8
    What about printing on pre-made forms? Does someone have a clue?

  6. #6
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    I probably won't be able to help but just to understand the problem:
    do you know how to print what you want from a web browser and
    your problem is how to print the same thing from the command line ?

  7. #7
    Just Joined! JoeB's Avatar
    Join Date
    Nov 2004
    Location
    Elburn, Illinois
    Posts
    83
    Have you looked into Scalable Vector Graphics?

  8. #8
    Just Joined!
    Join Date
    Jun 2005
    Posts
    8
    Quote Originally Posted by Santa's little helper
    I probably won't be able to help but just to understand the problem:
    do you know how to print what you want from a web browser and
    your problem is how to print the same thing from the command line ?
    Right. I do know how to print stuff using a browser, I want to create a script that can send formatted output let's say HTML to the printer (not the HTML code). I have already looked at Latex and html2latex but I cannot achieve the look that I am looking for.

    My goal right now is to produce professional looking invoices among other things to send to customers, but to retrieve the data that is stored on a MySql database, all from the command line via scripts.

    So, my other question was, because I remember a little Visual Basic and you can manipulate the printer object and print at an X or Y position, If I already have a form (invoice printed with my company name at the printer) how can I fill in the blanks?

    Have you looked into Scalable Vector Graphics?
    No. Are you familiar with it? Can you give me an over all scenario (in a nutshell) as to how things work? If not, I really appreciate it. I am going to have to check it out. Thank You!

    Any more ideas???

  9. #9
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    Right. I do know how to print stuff using a browser, I want to create a script that can send formatted output let's say HTML to the printer (not the HTML code). I have already looked at Latex and html2latex but I cannot achieve the look that I am looking for.
    So why can't you print what you want using a browser ? Is it because
    you're trying to automate the whole process ? Anyway a Google search
    showed that there are several html to postscript programmes so perhaps
    you could try one of those ?
    My goal right now is to produce professional looking invoices among other things to send to customers, but to retrieve the data that is stored on a MySql database, all from the command line via scripts.
    Is this a different problem ? You want to know how to retrieve
    data from the database using the command line ?

  10. #10
    Just Joined!
    Join Date
    Jun 2005
    Posts
    8
    Quote Originally Posted by Santa's little helper
    Right. I do know how to print stuff using a browser, I want to create a script that can send formatted output let's say HTML to the printer (not the HTML code). I have already looked at Latex and html2latex but I cannot achieve the look that I am looking for.
    So why can't you print what you want using a browser ? Is it because
    you're trying to automate the whole process ? Anyway a Google search
    showed that there are several html to postscript programmes so perhaps
    you could try one of those ?
    My goal right now is to produce professional looking invoices among other things to send to customers, but to retrieve the data that is stored on a MySql database, all from the command line via scripts.
    Is this a different problem ? You want to know how to retrieve
    data from the database using the command line ?
    First of all, thank you for replying. Yes I am trying to automate the whole thing, I would use cron later on to run the scripts.

    Html to postscript is along the line of what I'm looking for. As far as retrieving data from MySql is not a problem. Thank you!

    Does someone know how to print on pre-made printer forms ?? To fill in the blanks?

Page 1 of 2 1 2 LastLast

Posting Permissions

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