Problem Printing html page with JEditorPane...

Hello All,
I Have a problem in printin html file with JEditorPane...
My Html file contains a Table on it..
Problem is that JEditorPane displays the html file correctly but
it prints the file without print that Table..
So pls help me...
Thanx in advance,..
Amit
[email protected]

I think you would know how to retrieve content of an HTML page using the URL object. Just in case.
My apology if this short note doesn't help you at all.

Similar Messages

  • Problems printing html page created from servlet

    Hi
    How do I go about to print a html page that spans outside the visible window (to the left). All I get when I print is the visible page.
    Is it at all possible?
    Would appreciate an answer.
    Thanks
    David Mossberg

    No, not impossible to do.
    You need to provide a printer friendly version of the content so that it spans correctly.
    Again, this is not a Java problem this is an Application problem.
    How you format the data is down to you.

  • All of a sudden I have problems printing web pages wwith Firefox 3.6.8 (XP), but printing pdf pages is still fine (printing with other software as well)

    Suddenly I can't print web pages with Firefox 3.6.8 anymore, but pdf pages pose no problem - the same applies to printing with any other software

    Thanks edmeister for your trouble!
    I guess I should have written that I had tried the tips on 'reset printer' and 'does not print to paper at all' before I posted the question - to no avail.
    The printer starts as normal: it's the right printer selected, the dialogue window shows the progress of sending the data to the printer - and after that: that's it. It simply vanishes from the queue, and nothing happens.

  • I have a printer xerox 3220 on networking ,have pc´s and a mac ,problem:it´s already install but does not work ,only print many page with code program,i will appreciate the solution

    i have a printer xerox 3220 on networking ,have pc´s and a mac ,problem:it´s already install but does not work ,only print many page with code program,i will appreciate the solution

    Hi guillermospain,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots. 
    OS X: Connecting a Wi-Fi printer to your Wi-Fi network
    http://support.apple.com/kb/ht3500
    OS X Mountain Lion: Set up a printer
    http://support.apple.com/kb/PH11145
    OS X Mountain Lion: Reset the printing system
    http://support.apple.com/kb/PH11143
    Cheers,
    - Judy

  • Printing web page with select tags in IE9 and a .cfm file-only the original selected option prints

    My web page has a select tag and cfselect tags and when I print the page with a different option other than the originally selected option the print for both types of select tags reverts back to the original selection and ignores the new selection.  This happens in IE9 and .cfm files but not when the page is printed in IE8 or IE7 modes (tried in the F12 Developer Tools.)  It also needs to be a .cfm file.  FireFox printed the pages correctly for any combination.
    This was done on a Dell and ThinkCentre computers under Windows 7.  Also, I was able to reproduce the same problem on an different university web site where a selection box would revert back to the original selection for printing on a .cfm page and would print properly on a .PHP page at the same site.
    For my site, I used a print button which calls print() and right clicked and chose print and got the same results no matter which method was used.  I only had the right click method on the third party web site.
    I know this is probably a bit narrow an issue but, any help would be appreciated.

    It appears that it is probably an IE9 bug.
    I simplified the problem by turning the page source taken from the brouser of the original .cfm into an html file and found that it would still print improperly.
    When I eliminated the various parts of the file I found that it would print correctly only when I removed the first line, the "DOC type" line.
    The page will print the newly selected option but then I lose the style sheet.
    If it does not work in an HTML file it must be IE.  It is not the .cfm.  The reason that it did not work for .cfm files, is that they always have a "DOC type" statement.
    I have put the issue into an MSDN forum in addition to the one mentioned previously.

  • How to go to anchor html link from external html page in JEditorPane

    Hi people,
    I've been trying to jump to an anchor link from an external html page in JEditorPane, and I cannot get it working, I'm sure it can be done somehow...
    The HTML page has a link like:
    Hello
    and this is loaded into JEditorPane ok.
    The HyperlinkListener implementation:
    public void hyperlinkUpdate( HyperlinkEvent e )
    try {
    if ( e.getEventType() == HyperlinkEvent.EventType.ACTIVATED )
    editorPane_.setPage( getClass().getResource(
    MyDialog.this.getBaseURL().concat( e.getURL().getFile().substring(
    e.getURL().getFile().lastIndexOf( "/" ) + 1 ) ) ) );
    if ( e.getURL().getRef() != null )
    editorPane_.scrollToReference( e.getURL().getRef() );
    else return;
    } catch ( IOException ioe ) { ioe.printStackTrace(); }
    This code loads the new html file ok, but it does not scroll to the anchor. The MyDialog.this.getBaseURL() just returns something like com.name.package, I construct the URL by using this base url and the name of the html file to open.
    ANy help, thanks

    he! I'm not alone in my desperation. Take a look at my problem:
    I've got a JEditorPane (not editable) inside a JFrame. The JEditorPane is loaded with the HTML text and all the links to anchors are working properly when I click on them.
    BUT
    If I try to go to an anchor from outside this JFrame I can see how the JEditorPane scrolls to the right anchor and suddenly it scrolls back to the place where the caret was located!!!
    The "funny thing" is that my code is working in jdk1.3.1 but this is happening in jdk1.4.2. Is it a bug?!?!?!
    How could I figure out what position I have to set the caret to for every anchor in order to get the scroll working correctly???
    My implementation of hyperlinkUpdate (working properly, here isn't the problem):
       jEditorPane.addHyperlinkListener(new HyperlinkListener() {
          public void hyperlinkUpdate(HyperlinkEvent e) {
            if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
              MiEditorPane src = (MiEditorPane)e.getSource();
              src.goToAnchor(e.getDescription().substring(1));
        });My object jEditorPane is an instance of this class:
      class MiEditorPane extends JEditorPane {
        MiEditorPane() {
          super();
        public void goToAnchor(String anchor) {
          super.scrollToReference(anchor);
      }And this is the method I call from outside the JFrame containing the JEditorPane:
      public void goToAnchor(String anchor) {
         jEditorPane.goToAnchor(anchor);
      }Any help greatly appreciated ...

  • Building HTML page with JSP from different applications

              Hi,
              we need to build a HTML page with 2 JSPs. If both JSP were in the same Application
              (Weblogic 8,1) there is no problem. But I have to use JSPs from differents web
              applications, each JSP is in different war files.
              How can I compose this page? How can I management the request object?
              thanks
              

    Your program print the whole jsp source code??
    This is your web server configuration problem.
    Your web server handle your jsp page like text file only.

  • A tree-view in HTML page with nodes generated with java script in run time is not visible in the UI Automation Tree. Need Help

    I have a HTML page with an IFrame. Inside the Iframe there is a table with a tree view
    <iframe>
    <table>
    <tr>
    <td>
    <treeview id="tv1"></treeview>
    </td>
    </tr>
    </table>
    </iframe>
    In UIA, i am able to traverse till the tree view but not able to see it.
    I have used the TreeWalker.RawViewWalker Field to traverse the node from the desktop Automation.RootElement. 
    I tried to use AutomationElement.FromPoint method to check whether i am able to get that element. Fortunately i was able to get the automation element. 
    i tried to get the path to root element from the node element using the TreeWalker.RawViewWalker. I was able to get the parent path to the root element.
    But trying the reverse way like navigating from root element to tree node, was not getting the element for me. 
    Please help me with suggestions or inputs to resolve this issue. 

    Thanks Bernard,
    It works fine with JInitiator but not working with
    the JPI. For JPI what settings I need to do ??hi TKARIM and Bernard, i am having similar problem even with the Bernard's recommended setup. could you post the webutiljini.htm (i presume you are using config=test) ?
    i am actually using jinitiator 1.3.1.28 with Oracle HTTP Server of OAS 10gR2) calling Forms Server 6i (f60cgi). After setting up according to Bernard's recommended setup steps, the java console showed that it loaded the icon jar file when it could not read the form, but it skipped the loading of the icon jar file once it read and started the form. How do we specify in the form to pick up the icon from the jar file instead from a directory ? Or do we need to specify ? Any ideas ?
    Thx and Regards
    dkklau

  • Displaying html page with in the applet

    I want to open an html page in the applet. If i use showDocument() of applet, it opens the html page in the browser, but i want to open the html page with in the applet(i.e., applet should display the html page). Is there any way which i can do the above thing.
    Thanks in advance

    Look at this sample:
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.text.*;
    public class BrwsA extends JApplet
         JPanel      jpa = new JPanel();
         JEditorPane jed = new JEditorPane();
         JScrollPane jsp = new JScrollPane(jpa);
    public BrwsA()
         jpa.setLayout(new BorderLayout());
         jpa.add(jed);
         jpa.setPreferredSize(new Dimension(800,1000));
         jed.setEditable(false);
         jed.setContentType("text/html");
         jed.getEditorKit().createDefaultDocument();
         setContentPane(jsp);
    public void init()
         try
              URL url = new URL(getCodeBase(),"test.html");
              jed.setPage(url);
         catch(MalformedURLException e)
         catch(IOException e)
    }Noah

  • Opening html page with in the applet

    I want to open an html page in the applet. If i use showDocument() of applet, it opens the html page in the browser, but i want to open the html page with in the applet(i.e., applet should display the html page). Is there any way which i can do the above thing.
    Thanks in advance

    Use a JEditorPane to display HTML (supports version 3.2 though)
    check API (that's for JDK 1.4.1 so check for version you use)
    http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/JEditorPane.html
    Sky

  • How can I print web pages with HP psc 2175 printer?

    Hi,
    I'm having difficulty printing web pages with my HP psc 2175 printer. The printer spits out many pages before the actual page I want printed and then at times it doesn't print all of the section desired.
    In fact, when I copied one page the other day, saved it as a pdf file to my computer, opened the file and the document still would not print.
    Anyone have any idea what could be happening?
    Lee

    I have a strange issue - I am also using HP Envy 100 410A and its prints fine from iPad2. But when I try to print from my Gen 1 iPad, it goes thru the motions (shows the printer, allows to select which pages to print, double sided print etc.) but the printing actually doesn't hapen.
    Any suggestions?
    Thanks

  • Print Html page Using Java

    I need to print Html Page into my printer, how can I do this. Any help will be appreciated.
    Wil

    File > Print.
    See: http://java.sun.com/javase/6/docs/technotes/guides/jps/spec/printing2d.fm.html
    And:
    http://java.sun.com/j2se/1.4.2/docs/guide/jps/index.html
    And google "Java JPS"

  • Replace HTML page with an applet

    Hello to everybody!
    I created a servlet who can manage file upload from an HTML page.
    Now I want to replace that HTML page with an applet.
    I know that I need to use multipart/form-data , but I have no experience with applet.
    HTML page code is:
    <html>
    <head><title>Upload</title></head>
    <body>
    <FORM ACTION="http://localhost:8080/examples/servlets/servlet/UploadTest" ENCTYPE="multipart/form-data" METHOD=POST>
    What is your name? <INPUT TYPE=TEXT NAME=submitter> <BR>
    Which file do you want to upload? <INPUT TYPE=FILE NAME=file> <BR>
    <INPUT TYPE=SUBMIT>
    </FORM>
    </body>
    </html>
    Any help for "translating" this html page into an applet?
    Applet will send, like html page, a string and a file.
    Thanks in advance, Liuk

    If you use something like Apache Http Client you dont have to do any low level implementations.
    Also if you are the one who is writing both servlet and applet you dot have to stick to standerd formats. you can develop your own format and write both servlet and applet to handle it. that kind of thing can be done easily even with URLConnection. But if you plan to send large files then URLConnection may not be the right option becouse I have seen many complaining that URLConnection gives OutOfMemoryErrors when uploading large amounts of data.

  • How to call html page with in the flash

    I am new to action script, can some one guide me how to call html page with in the flash. lets say i have movie clip having instance name as "news_feed", I need to disply the html page in this news_feed. kindly help me, thanks alot

    some one tell me, weather it is possible or not ??

  • Designing Embedded HTML Page with iWeb

    I designed a html page with with an embedded html page within it. It all looks fine in iWeb, but when I upload the page to the intenet and I try to view this page it does not come up properly. Although I initially see the page come up as I designed it (for a fraction of a second) it then disapears and I only see the page I embedded on my page.
    I added the following codes in HTML Snippet:
    <object data=http://www.mls.ca/PropertyResults.aspx?&vs=Residential&ret=300&curPage=PropertySearch.a spx&sts=0-0&beds=0-0&baths=0-0&bt=1%2c16%2c17&atsg=%2c&ci=cartierville&pro=4&mp= 500000-0-0&mrt=0-0-4&trt=2&of=1&ps=10&o=D width="600" height="400"> <embed src=http://www.mls.ca/PropertyResults.aspx?&vs=Residential&ret=300&curPage=PropertySearch.a spx&sts=0-0&beds=0-0&baths=0-0&bt=1%2c16%2c17&atsg=%2c&ci=cartierville&pro=4&mp= 500000-0-0&mrt=0-0-4&trt=2&of=1&ps=10&o=D width="600" height="400"> </embed> Embedd a web page within another web page. </object>
    <object data=http://www.mls.ca width="600" height="400"> <embed src=http://www.mls.ca width="600" height="400"> </embed> Embedd a web page within another web page. </object>
    As I said, the above pages come up fine in iWeb but not when I search them with Sagari.
    Can someone please help with this. Thanks, Padano

    This is the proper code :
    <iframe src="http://url.to.file.html" frameborder="0" width="500" height="500" scrolling="no" allowTransparency="true"></iframe>
    You can also use this :
    <div style="width: 650px; height: 650px">
      <script language="JavaScript">
        location.replace('../../../your files.html');
      </script>
    </div>
    Source : iframe alternative in the HTML Snippet
    And on this page you can see how to use <object> for html, png and jpg files :
    Embed content with the <object> HTML element

Maybe you are looking for