Printing a URL - possible?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Printing a URL - possible?

  1. #1
    Kris Eiben Guest

    Printing a URL - possible?

    Hello all,

    We're trying to find a way to print multiple complex HTML pages (actually
    DHTML reports customized using ASP, but that shouldn't make a difference).
    Have tried IFrames, ILayers, client-side Javascript -- only thing that's
    worked well has been an ActiveX control, and some of our users now say they
    aren't allowed to use ActiveX controls, and others only use Netscape so they
    aren't served at all by this solution. We're thinking a Java applet is the
    way to go. So, before I take the time to learn the language and try writing
    one ...

    Can Java do this? It would be perfect if it could also change printer
    settings (landscape, no header/footer, margins, background images), but just
    being able to send a series of URLs to an applet and having it print them
    without the user having to deal with a print dialog for each one would be a
    major victory at this point.

    Please reply, even if your answer is "clueless newbie, it's too simple to
    even show an example." I checked this and the java.general newsgroups, and
    questions about printing tend to go unanswered. So please do share, even if
    you don't think you have much to share. Thanks!

    Kris Eiben
    Automation Creations, Inc.

    BTW If there's an applet (doesn't have to be free, or even cheap) already
    out there that does this, please point the way. I've looked everywhere I
    know to look (including JARS) and haven't seen even one that does anything
    like this.



  2. #2
    John Timney (MVP) Guest

    Re: Printing a URL - possible?

    if your on about printing from an applet then you will need to sign your
    applet, this needs to be done differently for netscape and ie applets to get
    out of whats known as the security sandbox. Sun did a really useful article
    on signing but I cant recall the url, you should be able to find it
    though...then you should have no problems controlling the client
    environment - including print. You will struggle to find much information
    on it though, Ivor Hortons Java 2 from wrox has a good section on printing
    in the revised edition that will help with the code for controlling the
    printer ...but getting the applet to work is an entirely more difficult
    thing....

    Regards

    John Timney (MVP)


    Kris Eiben <kris@matls.com> wrote in message news:3912eb9e@news.devx.com...
    > Hello all,
    >
    > We're trying to find a way to print multiple complex HTML pages (actually
    > DHTML reports customized using ASP, but that shouldn't make a difference).
    > Have tried IFrames, ILayers, client-side Javascript -- only thing that's
    > worked well has been an ActiveX control, and some of our users now say

    they
    > aren't allowed to use ActiveX controls, and others only use Netscape so

    they
    > aren't served at all by this solution. We're thinking a Java applet is

    the
    > way to go. So, before I take the time to learn the language and try

    writing
    > one ...
    >
    > Can Java do this? It would be perfect if it could also change printer
    > settings (landscape, no header/footer, margins, background images), but

    just
    > being able to send a series of URLs to an applet and having it print them
    > without the user having to deal with a print dialog for each one would be

    a
    > major victory at this point.
    >
    > Please reply, even if your answer is "clueless newbie, it's too simple to
    > even show an example." I checked this and the java.general newsgroups,

    and
    > questions about printing tend to go unanswered. So please do share, even

    if
    > you don't think you have much to share. Thanks!
    >
    > Kris Eiben
    > Automation Creations, Inc.
    >
    > BTW If there's an applet (doesn't have to be free, or even cheap) already
    > out there that does this, please point the way. I've looked everywhere I
    > know to look (including JARS) and haven't seen even one that does anything
    > like this.
    >
    >




  3. #3
    Kris Eiben Guest

    Re: Printing a URL - possible?

    Thank you. I'll find that book (I've got his Beginning Java book now).

    John Timney (MVP) wrote in message <39145aa3@news.devx.com>...
    >if your on about printing from an applet then you will need to sign your
    >applet, this needs to be done differently for netscape and ie applets to

    get
    >out of whats known as the security sandbox. Sun did a really useful

    article
    >on signing but I cant recall the url, you should be able to find it
    >though...then you should have no problems controlling the client
    >environment - including print. You will struggle to find much information
    >on it though, Ivor Hortons Java 2 from wrox has a good section on printing
    >in the revised edition that will help with the code for controlling the
    >printer ...but getting the applet to work is an entirely more difficult
    >thing....
    >
    >Regards
    >
    >John Timney (MVP)
    >
    >
    >Kris Eiben <kris@matls.com> wrote in message news:3912eb9e@news.devx.com...
    >> Hello all,
    >>
    >> We're trying to find a way to print multiple complex HTML pages (actually
    >> DHTML reports customized using ASP, but that shouldn't make a

    difference).
    >> Have tried IFrames, ILayers, client-side Javascript -- only thing that's
    >> worked well has been an ActiveX control, and some of our users now say

    >they
    >> aren't allowed to use ActiveX controls, and others only use Netscape so

    >they
    >> aren't served at all by this solution. We're thinking a Java applet is

    >the
    >> way to go. So, before I take the time to learn the language and try

    >writing
    >> one ...
    >>
    >> Can Java do this? It would be perfect if it could also change printer
    >> settings (landscape, no header/footer, margins, background images), but

    >just
    >> being able to send a series of URLs to an applet and having it print them
    >> without the user having to deal with a print dialog for each one would be

    >a
    >> major victory at this point.
    >>
    >> Please reply, even if your answer is "clueless newbie, it's too simple to
    >> even show an example." I checked this and the java.general newsgroups,

    >and
    >> questions about printing tend to go unanswered. So please do share, even

    >if
    >> you don't think you have much to share. Thanks!
    >>
    >> Kris Eiben
    >> Automation Creations, Inc.
    >>
    >> BTW If there's an applet (doesn't have to be free, or even cheap) already
    >> out there that does this, please point the way. I've looked everywhere I
    >> know to look (including JARS) and haven't seen even one that does

    anything
    >> like this.




  4. #4
    Jerry Rodgers Guest

    Re: Printing a URL - possible?


    Hi Kris,

    I am in the same situation. I have been hunting everywhere for a similar
    solution. I just want to be able to call a couple of urls and print them
    wihtout the print dialog appearing.

    What did you end up doing? Did you find an applet? I would rather have just
    a plain JavaScript solution.

    Thanks,
    Jerry


    "Kris Eiben" <kris@matls.com> wrote:
    >Thank you. I'll find that book (I've got his Beginning Java book now).
    >
    >John Timney (MVP) wrote in message <39145aa3@news.devx.com>...
    >>if your on about printing from an applet then you will need to sign your
    >>applet, this needs to be done differently for netscape and ie applets to

    >get
    >>out of whats known as the security sandbox. Sun did a really useful

    >article
    >>on signing but I cant recall the url, you should be able to find it
    >>though...then you should have no problems controlling the client
    >>environment - including print. You will struggle to find much information
    >>on it though, Ivor Hortons Java 2 from wrox has a good section on printing
    >>in the revised edition that will help with the code for controlling the
    >>printer ...but getting the applet to work is an entirely more difficult
    >>thing....
    >>
    >>Regards
    >>
    >>John Timney (MVP)
    >>
    >>
    >>Kris Eiben <kris@matls.com> wrote in message news:3912eb9e@news.devx.com...
    >>> Hello all,
    >>>
    >>> We're trying to find a way to print multiple complex HTML pages (actually
    >>> DHTML reports customized using ASP, but that shouldn't make a

    >difference).
    >>> Have tried IFrames, ILayers, client-side Javascript -- only thing that's
    >>> worked well has been an ActiveX control, and some of our users now say

    >>they
    >>> aren't allowed to use ActiveX controls, and others only use Netscape

    so
    >>they
    >>> aren't served at all by this solution. We're thinking a Java applet

    is
    >>the
    >>> way to go. So, before I take the time to learn the language and try

    >>writing
    >>> one ...
    >>>
    >>> Can Java do this? It would be perfect if it could also change printer
    >>> settings (landscape, no header/footer, margins, background images), but

    >>just
    >>> being able to send a series of URLs to an applet and having it print

    them
    >>> without the user having to deal with a print dialog for each one would

    be
    >>a
    >>> major victory at this point.
    >>>
    >>> Please reply, even if your answer is "clueless newbie, it's too simple

    to
    >>> even show an example." I checked this and the java.general newsgroups,

    >>and
    >>> questions about printing tend to go unanswered. So please do share,

    even
    >>if
    >>> you don't think you have much to share. Thanks!
    >>>
    >>> Kris Eiben
    >>> Automation Creations, Inc.
    >>>
    >>> BTW If there's an applet (doesn't have to be free, or even cheap) already
    >>> out there that does this, please point the way. I've looked everywhere

    I
    >>> know to look (including JARS) and haven't seen even one that does

    >anything
    >>> like this.

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center