Codota Logo
PdfContentByte.setFontAndSize
Code IndexAdd Codota to your IDE (free)

How to use
setFontAndSize
method
in
com.itextpdf.text.pdf.PdfContentByte

Best Java code snippets using com.itextpdf.text.pdf.PdfContentByte.setFontAndSize (Showing top 20 results out of 315)

  • Common ways to obtain PdfContentByte
private void myMethod () {
PdfContentByte p =
  • Codota IconPdfWriter writer;writer.getDirectContent()
  • Codota IconPdfStamper pdfStamper;pdfStamper.getOverContent(pageNum)
  • Codota IconPdfStamper pdfStamper;pdfStamper.getUnderContent(pageNum)
  • Smart code suggestions by Codota
}
origin: org.gephi/preview-plugin

  cb.setFontAndSize(bf, font.getSize());
  cb.showTextAligned(PdfContentByte.ALIGN_CENTER, label, x, -y - (textHeight / 2f), 0f);
  cb.endText();
cb.setFontAndSize(bf, font.getSize());
cb.showTextAligned(PdfContentByte.ALIGN_CENTER, label, x, -y - (textHeight / 2f), 0f);
cb.endText();
origin: org.gephi/preview-plugin

  cb.setFontAndSize(bf, font.getSize());
  cb.showTextAligned(PdfContentByte.ALIGN_CENTER, label, x, -y - (textHeight / 2f), 0f);
  cb.endText();
cb.setFontAndSize(bf, font.getSize());
cb.showTextAligned(PdfContentByte.ALIGN_CENTER, label, x, -y - (textHeight / 2f), 0f);
cb.endText();
origin: com.itextpdf/itextg

text.setFontAndSize(currentFont.getFont(), currentFont.size());
origin: com.itextpdf/itextpdf

text.setFontAndSize(currentFont.getFont(), currentFont.size());
origin: com.itextpdf/itextpdf

  cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(font, size);
cb.setTextMatrix(textStartX, textStartY);
cb.showText(fullCode);
origin: caryyu/excel2pdf

  @Override
  public void onEndPage(PdfWriter writer, Document document) {
    // 在每页结束的时候把“第x页”信息写道模版指定位置
    PdfContentByte byteContent = writer.getDirectContent();
    String text = "第" + writer.getPageNumber() + "页";
    float textWidth = this.baseFont.getWidthPoint(text, 8);
    float realWidth = document.right() - textWidth;
    //
    byteContent.beginText();
    byteContent.setFontAndSize(this.baseFont, 10);
    byteContent.setTextMatrix(realWidth, document.bottom());
    byteContent.showText(text);
    byteContent.endText();
    byteContent.addTemplate(this.template, realWidth, document.bottom());
  }
}
origin: grakic/jfreesteel

cb.beginText();
cb.setFontAndSize(bf, 15);
writeText(cb, "ЧИТАЧ  ЕЛЕКТРОНСКЕ  ЛИЧНЕ  КАРТЕ: ШТАМПА  ПОДАТАКА", 62, 760);
cb.setFontAndSize(bf, 11);
writeLabel(cb, "Подаци о грађанину", 537);
writeLabel(cb, "Подаци о документу", 288);
cb.setFontAndSize(bf, 10);
writeLine(cb, "Презиме:", info.getSurname(), 513);
writeLine(cb, "Име:", info.getGivenName(), 489);
origin: org.xhtmlrenderer/flying-saucer-pdf-itext5

FontDescription desc = _font.getFontDescription();
float fontSize = _font.getSize2D() / _dotsPerPoint;
cb.setFontAndSize(desc.getFont(), fontSize);
float b = (float) mx[1];
float c = (float) mx[2];
origin: com.itextpdf/itextpdf

  cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(font, size);
cb.setTextMatrix(textStartX, textStartY);
cb.showText(fullCode);
origin: com.itextpdf/itextg

  cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(font, size);
cb.setTextMatrix(textStartX, textStartY);
cb.showText(fullCode);
origin: cn.jeeweb/jeeweb-common-utils

content.beginText();
content.setColorFill(BaseColor.LIGHT_GRAY);
content.setFontAndSize(base, 50);// 设置字体的大小
content.setTextMatrix(70, 200);
content.showTextAligned(Element.ALIGN_CENTER, waterMarkName, 100,
origin: com.itextpdf/itextg

  cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(font, size);
cb.setTextMatrix(textStartX, textStartY);
cb.showText(fullCode);
origin: com.itextpdf/itextpdf

  cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(font, size);
cb.setTextMatrix(textStartX, textStartY);
cb.showText(fullCode);
origin: com.itextpdf/itextpdf

  cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(font, size);
cb.setTextMatrix(textStartX, textStartY);
cb.showText(fullCode);
origin: com.itextpdf/itextg

  cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(font, size);
cb.setTextMatrix(textStartX, textStartY);
cb.showText(fullCode);
origin: com.itextpdf/itextpdf

cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(bf, fontSize);
cb.setTextMatrix(tx, ty);
cb.showText(text);
origin: com.itextpdf/itextg

cb.setColorFill(textColor);
cb.beginText();
cb.setFontAndSize(bf, fontSize);
cb.setTextMatrix(tx, ty);
cb.showText(text);
origin: com.github.hazendaz/displaytag

float textBase = document.bottom() - 20;
cb.beginText();
cb.setFontAndSize(helv, 12);
float adjust = helv.getWidthPoint("0", 12);
cb.setTextMatrix(document.right() - textSize - adjust, textBase);
origin: com.itextpdf/itextpdf

setFontAndSize(bf, size);
showTextAligned(PdfContentByte.ALIGN_CENTER, text, (float)(llx + (urx - llx) / 2), (float)(lly + (ury - lly - size) / 2), 0);
endText();
origin: com.itextpdf/itextg

setFontAndSize(bf, size);
showTextAligned(PdfContentByte.ALIGN_CENTER, text, (float)(llx + (urx - llx) / 2), (float)(lly + (ury - lly - size) / 2), 0);
endText();
com.itextpdf.text.pdfPdfContentBytesetFontAndSize

Javadoc

Set the font and the size for the subsequent text writing.

Popular methods of PdfContentByte

  • addTemplate
    adds a template with the given matrix.
  • createTemplate
  • beginText
    Starts the writing of text.
  • endText
    Ends the writing of text and makes the current font invalid.
  • lineTo
    Appends a straight line segment from the current point (x, y). The new current point is (x, y).
  • moveTo
    Move the current point (x, y), omitting any connecting line segment.
  • restoreState
    Restores the graphic state. saveState andrestoreState must be balanced.
  • saveState
    Saves the graphic state. saveState andrestoreState must be balanced.
  • setLineWidth
    Changes the line width. The line width specifies the thickness of the line used to stroke a path and
  • stroke
    Strokes the path.
  • addImage
    Adds an Image to the page. The Image must have absolute positioning. The image can be placed inline.
  • setTextMatrix
    Changes the text matrix.
  • addImage,
  • setTextMatrix,
  • showText,
  • fill,
  • rectangle,
  • setColorFill,
  • setColorStroke,
  • setGState,
  • beginLayer

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • putExtra (Intent)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Path (java.nio.file)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now