Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfContentByte.restoreState()


                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col], heights[line + 1]);
                cb.stroke();
            }
        }
        cb.restoreState();
    }
   
    /**
     * General example using table events.
     * @param args
View Full Code Here


                headerHeight += heights[k];
            cb.setRGBColorStroke(0, 0, 255);
            cb.rectangle(widths[0], heights[headerRows], widths[widths.length - 1] - widths[0], heights[0] - heights[headerRows]);
            cb.stroke();
        }
        cb.restoreState();
       
        cb = canvases[LwgPdfPTable.BASECANVAS];
        cb.saveState();
        // border for the cells
        cb.setLineWidth(.5f);
View Full Code Here

                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col], heights[line + 1]);
                cb.stroke();
            }
        }
        cb.restoreState();
    }
   
    /**
     * General example using table events (with colspan).
     * @param args
View Full Code Here

            g2.clipRect(0, 0, 500, 500);
            table.print(g2);
            g2.setClip(oldClip);
           
            g2.dispose();
            cb.restoreState();
           
            document.newPage();
           
            // Create the graphics with pdf fonts
            cb.saveState();
View Full Code Here

            g2.clipRect(0, 0, 500, 500);
            table.print(g2);
            g2.setClip(oldClip);
           
            g2.dispose();
            cb.restoreState();
           
        } catch (Exception e) {
          e.printStackTrace();
            System.err.println(e.getMessage());
        }
View Full Code Here

                seitex.setFontAndSize(bf, fontsize);
                seitex.setTextMatrix(m1, m2, m3, m4, xoff + recc.getWidth() / 2,
                                     yoff + recc.getHeight() / 2);
                seitex.showText(text);
                seitex.endText();
                seitex.restoreState();
            }
            stamp.close();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(internalFrame, e.getMessage(), e
                                          .getClass().getName(),
View Full Code Here

                    cb.beginText();
                    cb.setFontAndSize(bf, 40);
                    cb.setTextMatrix(50, 50);
                    cb.showText(caption);
                    cb.endText();
                    cb.restoreState();

                    label = image.getName();
                    if (label.lastIndexOf('.') > 0) {
                        label = label.substring(0, label.lastIndexOf('.'));
                    }
View Full Code Here

        }
    }
   
    public void setClip(Shape s) {
        PdfContentByte cb = _currentPage;
        cb.restoreState();
        cb.saveState();
        if (s != null)
            s = _transform.createTransformedShape(s);
        if (s == null) {
            _clip = null;
View Full Code Here

      cb.fill();
      cb.saveState();
      cb.setColorFill(Color.blue);
      cb.circle(260.0f, 500.0f, 150.0f);
      cb.fill();
      cb.restoreState();
      cb.circle(260.0f, 500.0f, 100.0f);
      cb.fill();
      cb.restoreState();
      cb.circle(260.0f, 500.0f, 50.0f);
      cb.fill();
View Full Code Here

      cb.circle(260.0f, 500.0f, 150.0f);
      cb.fill();
      cb.restoreState();
      cb.circle(260.0f, 500.0f, 100.0f);
      cb.fill();
      cb.restoreState();
      cb.circle(260.0f, 500.0f, 50.0f);
      cb.fill();
     
      cb.sanityCheck();
    } catch (DocumentException de) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.