CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    To print a html file programmatically, without having to open it in any browser

    I have a few report names with selection criterias stored i the database. I have two places wherein i should call them. One is the reports module wherein I call the report directly and the output of the report is displayed on the screen and there is no problem. I have a servlet which does this. The problem is in the second area where in, i need to call this report which returns me a html file and then print the html file on the printer programatically. The problem here would be that, it would print the source code instead of the formatted content. Can u help me out? It would be great if you could kindly send me some ready made code with instructions about how to use it (i.e., the parameters to be passed, etc.). We use Html and servlets.

    Thanks,

    Krishnan


  2. #2
    Join Date
    Apr 2000
    Location
    India (Gujarat)
    Posts
    12

    Re: To print a html file programmatically, without having to open it in any browser

    Hi,

    I am not sure i've understood your problem but you can generate html outputs with servlet.

    If you are getting response from the servlet in html, then open the page and print it!

    if this is not the problem and you want to print directly without opening i think you need html parser and interpreter that is available in the browser. Otherwise it will print the html script.



  3. #3
    Join Date
    Apr 2000
    Location
    India
    Posts
    6

    Re: To print a html file programmatically, without having to open it in any browser

    Hi Nirmit,

    Thanks for the effort you took in going through my question. Actually, the second part is the problem we are facing. i.e.,having to use html parsers to print the html page. It would be very kind of you to guide me in how to use these parsers, also taking care that it doesnt affect the html page if opened explicitly.

    Thanks and looking forward for an early reply.

    Bye,

    Kris


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured