printing in php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael G

    printing in php

    I have an online application that generates some data. Currently the data is
    being displayed in browsers using basic html. Each set of data generates a
    separate report. I want to send these reports to the printer without having
    to open each one and then click on print. ;-). If I take each report that is
    generated and convert it into a string and then send it to the printer, I
    get the html tags too. Hmmm...obviousl y this in not good. :-)

    How do I get rid of the formatting tags and just print the formatted data in
    any format?

    Thanks, Mike



    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  • Andy Hassall

    #2
    Re: printing in php

    On Mon, 15 Aug 2005 15:01:22 -0600, "Michael G" <mike-g@montana.com> wrote:
    [color=blue]
    >I have an online application that generates some data. Currently the data is
    >being displayed in browsers using basic html. Each set of data generates a
    >separate report. I want to send these reports to the printer without having
    >to open each one and then click on print. ;-). If I take each report that is
    >generated and convert it into a string and then send it to the printer, I
    >get the html tags too. Hmmm...obviousl y this in not good. :-)[/color]

    Which printer? PHP can only send data to the printer connected to the server.

    Client-side would require Javascript - window.print(), I think it is the
    function to request the client to print, if permitted/appropriate/possible.
    [color=blue]
    >How do I get rid of the formatting tags and just print the formatted data in
    >any format?[/color]

    http://uk2.php.net/strip_tags is the most primitive way of doing this, but
    might work for your purposes.

    If you're printing from the server then perhaps you want to render HTML as
    Postscript and dump that to the printer - try searching for "html2ps".

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • Michael G

      #3
      Re: printing in php


      "Andy Hassall" <andy@andyh.co. uk> wrote in message
      news:5f12g19ud3 6i36b54ghqbu5me repb89mq9@4ax.c om...[color=blue]
      > On Mon, 15 Aug 2005 15:01:22 -0600, "Michael G" <mike-g@montana.com>
      > wrote:
      >[color=green]
      >>I have an online application that generates some data. Currently the data
      >>is
      >>being displayed in browsers using basic html. Each set of data generates a
      >>separate report. I want to send these reports to the printer without
      >>having
      >>to open each one and then click on print. ;-). If I take each report that
      >>is
      >>generated and convert it into a string and then send it to the printer, I
      >>get the html tags too. Hmmm...obviousl y this in not good. :-)[/color]
      >
      > Which printer? PHP can only send data to the printer connected to the
      > server.
      >[/color]

      server
      [color=blue][color=green]
      >>How do I get rid of the formatting tags and just print the formatted data
      >>in
      >>any format?[/color]
      >
      > http://uk2.php.net/strip_tags is the most primitive way of doing this, but
      > might work for your purposes.[/color]

      strip the tags = strip the format.
      That's no good. I want maintain the format.
      [color=blue]
      > If you're printing from the server then perhaps you want to render HTML as
      > Postscript and dump that to the printer - try searching for "html2ps".
      >[/color]

      Thanks.



      ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
      http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
      ----= East and West-Coast Server Farms - Total Privacy via Encryption =----

      Comment

      Working...