Package com.lowagie.text.pdf

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


      PdfContentByte cb = pdfWriter.getDirectContent();
      cb.saveState();
      cb.setFontAndSize(font.getBaseFont(), font.getSize());
      cb.beginText();
      cb.setTextMatrix(x , y);
      cb.showText(text);
      cb.endText();
      cb.restoreState();
  }
  /**
   *
 
View Full Code Here


    cb.saveState();
    cb.beginText();
    cb.setFontAndSize(helv, fontSize);

    cb.setTextMatrix(document.right() - textSize - adjust*2 , textBase);
    cb.showText(textPageOfPage);

    if (editTextAlign == Chunk.ALIGN_LEFT) {
      cb.setTextMatrix(document.left(), textBase);
    } else {
      float editDateTextSize = helv.getWidthPoint(footerText, fontSize);
View Full Code Here

      cb.setTextMatrix(document.left(), textBase);
    } else {
      float editDateTextSize = helv.getWidthPoint(footerText, fontSize);
      cb.setTextMatrix((document.right() - document.left()- editDateTextSize)/2, textBase);
    }
    cb.showText(footerText);

    cb.endText();

    if (headerLogo != null) {
View Full Code Here

            float textBase = document.bottom() - 20;
            cb.beginText();
            cb.setFontAndSize(helv, 12);
            float adjust = helv.getWidthPoint("0", 12);
            cb.setTextMatrix(document.right() - textSize - adjust, textBase);
            cb.showText(text);
            cb.endText();
            cb.addTemplate(tpl, document.right() - adjust, textBase);
            cb.saveState();
        }
    }
View Full Code Here

        seitex.setGState(gs1);
        seitex.beginText();
        seitex.setFontAndSize(bf, fontsize);
        seitex.setTextMatrix(m1, m2, m3, m4, xoff + recc.width() / 2,
                             yoff + recc.height() / 2);
        seitex.showText(text);
        seitex.endText();
        seitex.restoreState();
      }
      stamp.close();
    }
View Full Code Here

        cb.beginText();
        cb.setFontAndSize(headerFont, 10);

        float adjust = headerFont.getWidthPoint("0", 10);
        cb.setTextMatrix(document.right() - textSize - adjust, textBase);
        cb.showText(text);
        cb.endText();
        cb.addTemplate(tpl, document.right() - adjust, textBase);

        cb.saveState();
        // draw a Rectangle around the page
View Full Code Here

              // text over the existing page
              over = stamp.getOverContent(i);
              over.beginText();
              over.setFontAndSize(bf, 18);
              over.setTextMatrix(30, 30);
              over.showText("page " + i);
              over.setFontAndSize(bf, 32);
              over.showTextAligned(LwgElement.ALIGN_LEFT, "DUPLICATE", 230, 430, 45);
              over.endText();
            }
            // adding an extra page
View Full Code Here

            float textBase = document.bottom() - 20;
            cb.beginText();
            cb.setFontAndSize(helv, 12);
            float adjust = helv.getWidthPoint("0", 12);
            cb.setTextMatrix(document.right() - textSize - adjust, textBase);
            cb.showText(text);
            cb.endText();
            cb.addTemplate(tpl, document.right() - adjust, textBase);
            cb.saveState();
        }
    }
View Full Code Here

                seitex.setGState(gs1);
                seitex.beginText();
                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) {
View Full Code Here

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

                    label = image.getName();
                    if (label.lastIndexOf('.') > 0) {
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.