public int print(Graphics g, PageFormat pf, int pageIndex) {
    // The area of the printable area.
    double ix = pf.getImageableX();
    double iy = pf.getImageableY();
    double iw = pf.getImageableWidth();
    double ih = pf.getImageableHeight();

    // The area of the actual page.
    double x = 0;
    double y = 0;
    double w = pf.getWidth();
    double h = pf.getHeight();
    return Printable.NO_SUCH_PAGE;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.