Examples of restoreState()


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

      pp.setSize(width, height);
      pp.setImageableArea(5, 5, width, height);
      pg.setPaper(pp);
      prm.print(g2, pg, 0);
      g2.dispose();
      cb.restoreState();
    }

    document.close();
    return baos.toByteArray();
  }
View Full Code Here

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

        }
    }
   
    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

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

                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

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

                    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

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

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

            pageLabels.addPageLabel(writer.getPageNumber(),
                                    PdfPageLabels.EMPTY, strsLabel[i]);

            System.out.println("Added image: " + strsLabel[i]);
View Full Code Here

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

                cb.addImage(headerImage, headerImage.getWidth(), 0, 0, headerImage.getHeight(), 440, 80);
            }
            catch(Exception e) {
                throw new ExceptionConverter(e);
            }
            cb.restoreState();
        }
        cb.sanityCheck();
    }
   
    /**
 
View Full Code Here

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

            cb.setColorFill(Color.pink);
            cb.beginText();
            cb.setFontAndSize(helv, 48);
            cb.showTextAligned(LwgElement.ALIGN_CENTER, "My Watermark Under " + writer.getPageNumber(), document.getPageSize().getWidth() / 2, document.getPageSize().getHeight() / 2, 45);
            cb.endText();
            cb.restoreState();
        }
    }
   
    /**
     * @see com.lowagie.text.pdf.PdfPageEventHelper#onCloseDocument(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document)
View Full Code Here

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

            cb.clip();
            cb.newPath();
            cb.saveState();
            cb.concatCTM(27.7843f, 0, 0, -27.7843f, 310.2461f, 121.1521f);
            cb.paintShading(shading);
            cb.restoreState();
           
            cb.sanityCheck();
           
            document.close();
        }
View Full Code Here

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

            cb.saveState();
            PdfGState gs1 = new PdfGState();
            gs1.setFillOpacity(0.5f);
            cb.setGState(gs1);
            pictureCircles(200 + 2 * gap, 500, cb);
            cb.restoreState();

            PdfTemplate tp = cb.createTemplate(200, 200);
            cb.saveState();
            pictureCircles(0, 0, tp);
            PdfTransparencyGroup group = new PdfTransparencyGroup();
View Full Code Here

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

            PdfTransparencyGroup group = new PdfTransparencyGroup();
            tp.setGroup(group);
            tp.sanityCheck();
            cb.setGState(gs1);
            cb.addTemplate(tp, gap, 500 - 200 - gap);
            cb.restoreState();

            tp = cb.createTemplate(200, 200);
            cb.saveState();
            PdfGState gs2 = new PdfGState();
            gs2.setFillOpacity(0.5f);
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.