How to know size of HTML page set to Jeditor pane  for printing

Hi,
i have to print an HTML doc which may be more no of pages .... ,that is set to jeditorpane and this component will be sent to print method , there i have to decide whether page exists. To do so i have to know how many pages the html doc occupies . how can i know ??
thanks in advance .......

Hi,
i have to print an HTML doc which may be more no of pages .... ,that is set to jeditorpane and this component will be sent to print method , there i have to decide whether page exists. To do so i have to know how many pages the html doc occupies . how can i know ??
thanks in advance .......

Similar Messages

  • How to create hyperlink in Html page using Java

    Hello every one
    I want to know that how can I create a hyperlink in Html page using java ?
    Let for example
    I have code like this and i want to give hyperlink to it using java.
    rember that i am creating node using this id="name" which give me multiple value. and i want to assign diff link to each name..?
    <tr>
    <td ><span id="name"></span>
    </tr>

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • How can I display the HTML page from servlet which is called by an applet

    How can I display the HTML page from servlet which is called by an
    applet using the doPost method. If I print the response i can able to see the html document. How I can display it in the browser.
    I am calling my struts action class from the applet. I want to show the response in the same browser.
    Code samples will be appreciated.

    hi
    I got one way for this .
    call a javascript in showDocument() to submit the form

  • How do I customize my html page in Dreamweaver CS5 to an Avery template that I wish to print out?

    How do I customize my html page in Dreamweaver CS5 to an Avery template that I wish to print out?

    Dreamweaver and websites do not easily match up to Avery templates.  If you are trying to develop a program for customers/etc to print labels, you should look for a script to generate a PDF file to ensure the accuracy of the printing.
    If you are trying to use Dreamweaver as a substitute to print your own labels, I would highly recommend using Microsoft Word, or Adobe InDesign for a better solution.

  • How do I create a custom page set up

    How do I create a custom page set up

    Seb,
    You can use the dropdown list in the File>Document Setup>Artboard; Custom is at the top (hidden at first view).

  • How to speep up opening html page in JEditorPane

    When i call jeditorPane.setPage( URL u ) it takes about 20 seconds to show page in my JEditoPane. Could you write how to speed up loading html page. My page has 30 page. Thanks!

    When i call jeditorPane.setPage( URL u ) it takes about 20 seconds to show page in my JEditoPane. Could you write how to speed up loading html page. My page has 30 page. Thanks!

  • How do I set a defauly orientation for printing?

    How do I set a default orientation for printing? 

    "Aperture has no such feature. The Apple web site has lot of downloads, some i'm sure should do what you want, in conjunction with Aperture. Allan"
    Allan where on the Apple website would such downloads be? This is news to me! LOL!
    Message was edited by: DVX100Shooter

  • I would like to get data analysis for solving statistic and making graphs, but this function is not in add-in. How should I do? I also set up microsoft office for mac 2011.

    I would like to get data analysis for solving statistic and making graphs, but this function is not in add-in. How should I do? I also set up microsoft office for mac 2011.

    Microsoft didn't include that with the 2011 version.
    There is a third-party application that substitutes for the add-in: http://www.analystsoft.com/en/products/statplusmac/
    They also have a limited, free version.

  • How to set the default values for print options

    Hi all,
    We can set the default value for print options, just like Logical destination、numbers of messages、print immediately and so on, so where we should to maintain these default?

    Hi Sandy,
    This can be done by an abaper by making changes in the driver program. The Driver program feeds all the data which u have mentioned for printing.
    if the driver program is standard. copy to an z type and make modification on printer settings on the driver program code.
    this will surely solve the issue.
    Regards
    Gunaseelan

  • How do I send edited photos from Elements 12 to Costco for printing?

    New user and have checked all trainng info....   How do I send edited photos from Elements 12 to Costco for printing?  Only Shutterfly is offered as option.  Or how can I export to "my pictures" or thumb drive?  

    If you don't have the special costco edition (in which case you should see costco as an option for ordering prints), if the photos are in the organizer, use File>Export as New File(s) to send them to your thumb drive, if that's what you want to do, or export them to a folder on your desktop, go to the costco website and point their software to that folder for uploading. If you don't use organizer, just save the files to a folder on your desktop and do the same.

  • How to redirect to an html page on submit

    I have this form and I would like when people click the submit btn, to be redirected to an html landing page. I'm not sure if I need to modify the php or the action script or both. Does anyone know how to do this?
    Thank you
    here is the code for both
    import flash.net.URLVariables; import flash.net.URLRequest;  /* Mouse Click Event Clicking on the specified symbol instance executes a function in which you can add your own custom code.  Instructions: 1. Add your custom code on a new line after the line that says "// Start your custom code" below. The code will execute when the symbol instance is clicked. */   submit.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);  function fl_MouseClickHandler(event:MouseEvent):void {            if (eMail.text == ""){           eMail.text = "Please enter in your email address";            }      else{           // Start your custom code      // create a variable container      var allVars:URLVariables = new URLVariables();      allVars.eMail = eMail.text;      allVars.bead = bead.selected;      allVars.jewelry = jewelry.selected;      allVars.onlineNewsletter = onlineNewsletter.selected;      allVars.sandiegoNewsletter = sandiegoNewsletter.selected;      //send info to URL      var mailAddress:URLRequest = new URLRequest("http://www.southsunbeads.com/media/flash/form.php");      mailAddress.data = allVars;      mailAddress.method = URLRequestMethod.POST;      sendToURL(mailAddress);           thankyou.text = "Thank you!";      }       eMail.text = "";         bead.selected = false;         jewelry.selected = false;         onlineNewsletter.selected = false;         sandiegoNewsletter.selected = false; }

    <?php
    // Create local variables from the Flash ActionScript posted variables
    $senderEmail     = $_POST['eMail'];
    $senderNewsletter1 = $_POST['bead'];
    $senderNewsletter2 = $_POST['jewelry'];
    $senderNewsletter3 = $_POST['onlineNewsletter'];
    $senderNewsletter4 = $_POST['sandiegoNewsletter'];
    // Strip slashes on the Local typed-in variables for security and run any php based error check here
    $senderEmail     = stripslashes($eMail);
    $senderMessage   = stripslashes($senderMessage);
    // IMPORTANT - Change these lines to be appropriate for your needs - IMPORTANT !!!!!!!!!!!!!!!!!!
    $to = "[email protected]";            
    $from = "$senderEmail";
    $subject = "Our customers from facebook and social networking";
    // Modify the Body of the message however you like
    $message = "Results from the form:
    eMail: $senderEmail
    Bead deal of the day: $senderNewsletter1
    Jewelry deal of the day: $senderNewsletter2
    online Newsletter: $senderNewsletter3
    San Diego Newsletter: $senderNewsletter4
    Their Message is below:
    $senderMessage";
    // Build $headers Variable
    $headers = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";
    $to = "$to";
        // Send the email
        mail($to, $subject, $message, $headers);
        // Assemble the message that goes back to Flash
        // The flash ActionScript is looking for a return variable of "return_msg" there is no sendername in my form, can be just change to generic message
        $my_msg = "Thanks $senderName, all data has been sent.";
        // Print the data back to flash who is patiently waiting for it in the onCompleteHandler
        print "return_msg=$my_msg";
    // Exit script   
    exit();
    ?>
    import flash.net.URLVariables;
    import flash.net.URLRequest;
    /* Mouse Click Event
    Clicking on the specified symbol instance executes a function in which you can add your own custom code.
    Instructions:
    1. Add your custom code on a new line after the line that says "// Start your custom code" below.
    The code will execute when the symbol instance is clicked.
    submit.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
        if (eMail.text == ""){
            eMail.text = "Please enter in your email address";
        else{
            // Start your custom code
        // create a variable container
        var allVars:URLVariables = new URLVariables();
        allVars.eMail = eMail.text;
        allVars.bead = bead.selected;
        allVars.jewelry = jewelry.selected;
        allVars.onlineNewsletter = onlineNewsletter.selected;
        allVars.sandiegoNewsletter = sandiegoNewsletter.selected;
        //send info to URL
        var mailAddress:URLRequest = new URLRequest("http://www.southsunbeads.com/media/flash/form.php");
        mailAddress.data = allVars;
        mailAddress.method = URLRequestMethod.POST;
        sendToURL(mailAddress);
            thankyou.text = "Thank you!";
         eMail.text = "";
            bead.selected = false;
            jewelry.selected = false;
            onlineNewsletter.selected = false;
            sandiegoNewsletter.selected = false;

  • How do i send an html page in java mail

    hi everyone, i have an problem while sending html page in my java mail application.Actually it's sending the html page correctly but the thing is it doesn't display the gif files . why so ? can anyone help me. i think its b'coz of the path problem.
    My requirement is like this :
    I would like to send an html page to some [email protected] from my local system . for that i have written one mail application which will build an html page which is also having some gif files. And these gif files are located in my local system. when i sent to some xyz user it's not displaying the gif files . How should i give the path for that gif files. pls help me regarding this. This is Urgent.
    Thanx in advance.
    by
    jjjavac

    hi , here with i have attached my program which will work fine . What u have to do is u have to specify ur smtp host address. from address and to address. And if u want to embedd the gif file u have to specify the gif file name. It will work only in outlook and hotmail. if u have anyother doubt let me know.
    import java.io.*;
    import java.util.Properties;
    import java.util.Date;
    import javax.mail.*;
    import javax.activation.*;
    import javax.mail.internet.*;
    import java.sql.*;
    import java.text.*;
    * @author Jeevan
    public class EmbeddingGif {
         StringBuffer sb = new StringBuffer();
         String line;
    public static void main(String[] argv) {
              new EmbeddingGif (argv);
    public EmbeddingGif (String[] argv) {
              String to, subject = null, from = "[email protected]",
              cc = null, bcc = null, url = null;
    //     String mailhost = null;
              String mailhost = "10.1.0.106";                    // SMTP host address
              String mailer = "SendHtmlMail";
              String protocol = "imap", host = null, user = "jeevan", password = "jeevan";
              String record = "g:/rbs/web-inf/classes/emailstore";     // name of folder in which to record mail
              boolean debug = false;
              BufferedReader in = null;
              int optind;
         for (optind = 0; optind < argv.length; optind++) {
         if (argv[optind].equals("-T")) {
              protocol = argv[++optind];
         } else if (argv[optind].equals("-H")) {
              host = argv[++optind];
         } else if (argv[optind].equals("-U")) {
              user = argv[++optind];
         } else if (argv[optind].equals("-P")) {
              password = argv[++optind];
         } else if (argv[optind].equals("-M")) {
              mailhost = argv[++optind];
         } else if (argv[optind].equals("-f")) {
              record = argv[++optind];
         } else if (argv[optind].equals("-s")) {
              subject = argv[++optind];
         } else if (argv[optind].equals("-o")) { // originator
              from = argv[++optind];
         } else if (argv[optind].equals("-c")) {
              cc = argv[++optind];
         } else if (argv[optind].equals("-b")) {
              bcc = argv[++optind];
         } else if (argv[optind].equals("-L")) {
              url = argv[++optind];
         } else if (argv[optind].equals("-d")) {
              debug = true;
         } else if (argv[optind].equals("--")) {
              optind++;
              break;
         } else if (argv[optind].startsWith("-")) {
              System.out.println(
    "Usage: SendHtmlMail [[-L store-url] | [-T prot] [-H host] [-U user] [-P passwd]]");
              System.out.println(
    "\t[-s subject] [-o from-address] [-c cc-addresses] [-b bcc-addresses]");
              System.out.println(
    "\t[-f record-mailbox] [-M transport-host] [-d] [address]");
              System.exit(1);
         } else {
              break;
         try {
         if (optind < argv.length) {
              // XXX - concatenate all remaining arguments
              to = argv[optind];
              System.out.println("To: " + to);
         } else {
              System.out.print("To: ");
              System.out.flush();
    //          to = in.readLine();
              to = "[email protected]";
         if (subject == null) {
              System.out.print("Subject: ");
              System.out.flush();
    //          subject = in.readLine();
              subject = "New Bill @ " + new Date ();
         } else {
              System.out.println("Subject: " + subject);
         Properties props = System.getProperties();
         // XXX - could use Session.getTransport() and Transport.connect()
         // XXX - assume we're using SMTP
              System.out.println("mailhost :"+mailhost);
              System.out.println("from :"+from);
              System.out.println("to :"+to);
              System.out.println("cc :"+cc);
              System.out.println("subject :"+subject);
              System.out.println("bcc :"+bcc);
              System.out.println("url :"+url);
         if (mailhost != null)
              props.put("mail.smtp.host", mailhost);
         // Get a Session object
         Session session = Session.getDefaultInstance (props, null);
         if (debug)
              session.setDebug (true);
         // construct the message
         Message msg = new MimeMessage(session);
         if (from != null)
              msg.setFrom(new InternetAddress(from));
         else
              msg.setFrom();
         msg.setRecipients(Message.RecipientType.TO,
                             InternetAddress.parse(to, false));
         if (cc != null)
              msg.setRecipients(Message.RecipientType.CC,
                             InternetAddress.parse(cc, false));
         if (bcc != null)
              msg.setRecipients(Message.RecipientType.BCC,
                             InternetAddress.parse(bcc, false));
         msg.setSubject(subject);
         collect(in, msg);
    //     msg.setHeader("X-Mailer", mailer);
    //     msg.setSentDate(new Date());
         // send the thing off
    //     Transport.send(msg);
    //     System.out.println("\nMail was sent successfully.");
         } catch (Exception e) {
         e.printStackTrace();
    public void collect(BufferedReader in, Message msg)     throws MessagingException, IOException {
                        BodyPart bp1=new MimeBodyPart();
                        String html="<H1>Hello from Jeevan</H1>";
                        html=html+"<img src=cid:mickey>";
                        bp1.setContent(html,"text/html");
                        MimeMultipart mp=new MimeMultipart("related");
                        mp.setSubType("related");
                        mp.addBodyPart(bp1);
                        BodyPart bp2=new MimeBodyPart();
                        DataSource source=new FileDataSource("fss.gif");
                        bp2.setDataHandler(new DataHandler(source));
                        bp2.setHeader("discrete-type","image");
                        bp2.setHeader("Content-ID","mickey");
                        mp.addBodyPart(bp2);
                        msg.setContent(mp);
                        Transport.send(msg);
         System.out.println("\nMail was sent successfully.");
    //                    msg.setDataHandler(new DataHandler(     new ByteArrayDataSource(sb.toString(), "text/html")));                                        

  • How to do hyperlink to html page?

    can i know how to do a hyperlink to html page once i click on a Jbutton? I need a help : )

    You can try something like this:
    String cmd = "c:/program files/ie.exe"; // WHat ever your explorer path is
    String url = "test.html"; // what ever your html path is
          try {
          Runtime.getRuntime().exec(cmd + " \"" + url + "\"");
          } catch (IOException ex) {
    ex.printStackTrace();
          }

  • How to call and run HTML pages from an Applet?

    I want to run another HTML page when pressed a button in an Applet,how can i do it?

    Are you looking for this?
    applet.getAppletContext().showDocument("http://cullenwines.com.au", "_top");

  • How to create dom treeof html page with java

    hi, all
    i met with a problem how to create dom tree of html page wih jave, that is, given a html page, how to create a dom tree of this page with java?
    thanks in advance.
    regards
    richard

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

Maybe you are looking for

  • Importing video from tape??????

    How can I import video from a Hi8 tape into my mac for editing in iMovie. The camera is a Sony CCD-TRV608 with a USB plug NOT firewire Thanks 1.5GHz G4 PowerBook & 2.1 GHz G5 iMac   Mac OS X (10.4.3)  

  • "acrobat could not create your workspace...

    ... on the server. Please try again." (And then "Acrobat failed to set up a workflow folder in the specified shared folder or hosted service"). I get this everytime I try to distribute a form in acrobat 9 (trial) to acrobat.com. I've been trying all

  • Removing an unwanted object-HELP!

    Hello, I'm editing a project in FCP, and I've noticed that a boom mic has hovered into one of my shots. I have a clean freeze frame that I'd like to use to edit out the microphone. What's the simplest way to get rid of it? Should I use a matte, or ma

  • Can't Open .aif File in SoundTrack

    I posted this in the SoundTrack forum, but didn't get any bites, so I thought I'd try it here. (I hope I'm not breaking protocol.) I assembled a multi-track soundtrack in ST. It's great, but now I need to make a few modifications. When I try to open

  • IPhone & iPad sync failure with usbmuxd issues

    I've lost all wired connectivity between iPad and iPhone to the paired desktop (never managed to get the wifi sync working) despite using previously working connection via hub and then direct USB cable connection. I have checked that the devices appe