com.lowagie.text.Paragraph.getFont()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中com.lowagie.text.Paragraph.getFont()方法的一些代码示例,展示了Paragraph.getFont()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Paragraph.getFont()方法的具体详情如下:
包路径:com.lowagie.text.Paragraph
类名称:Paragraph
方法名:getFont

Paragraph.getFont介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

Paragraph paragraph=new Paragraph("Test in the Cell");

paragraph.getFont().setStyle(Font.BOLD);

Cell c=new Cell(paragraph);

table.addCell(c);

代码示例来源:origin: com.github.librepdf/openpdf

/**
 * Constructs a Paragraph that will be used as title for a Section or Chapter.
 * @param    title    the title of the section
 * @param    numbers    a list of sectionnumbers
 * @param    numberDepth    how many numbers have to be shown
 * @param    numberStyle    the numbering style
 * @return    a Paragraph object
 * @since    iText 2.0.8
 */
public static Paragraph constructTitle(Paragraph title, ArrayList numbers, int numberDepth, int numberStyle) {
  if (title == null) {
    return null;
  }
  int depth = Math.min(numbers.size(), numberDepth);
  if (depth < 1) {
    return title;
  }
  StringBuffer buf = new StringBuffer(" ");
  for (int i = 0; i < depth; i++) {
    buf.insert(0, ".");
    buf.insert(0, ((Integer) numbers.get(i)).intValue());
  }
  if (numberStyle == NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT) {
    buf.deleteCharAt(buf.length() - 2);
  }
  Paragraph result = new Paragraph(title);
  result.add(0, new Chunk(buf.toString(), title.getFont()));
  return result;
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

/**
 * Constructs a Paragraph that will be used as title for a Section or Chapter.
 * @param    title    the title of the section
 * @param    numbers    a list of sectionnumbers
 * @param    numberDepth    how many numbers have to be shown
 * @param    numberStyle    the numbering style
 * @return    a Paragraph object
 * @since    iText 2.0.8
 */
public static Paragraph constructTitle(Paragraph title, ArrayList numbers, int numberDepth, int numberStyle) {
  if (title == null) {
    return null;
  }
  int depth = Math.min(numbers.size(), numberDepth);
  if (depth < 1) {
    return title;
  }
  StringBuffer buf = new StringBuffer(" ");
  for (int i = 0; i < depth; i++) {
    buf.insert(0, ".");
    buf.insert(0, ((Integer) numbers.get(i)).intValue());
  }
  if (numberStyle == NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT) {
    buf.deleteCharAt(buf.length() - 2);
  }
  Paragraph result = new Paragraph(title);
  result.add(0, new Chunk(buf.toString(), title.getFont()));
  return result;
}

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

/**
 * Constructs a Paragraph that will be used as title for a Section or Chapter.
 * @param    title    the title of the section
 * @param    numbers    a list of sectionnumbers
 * @param    numberDepth    how many numbers have to be shown
 * @param    numberStyle    the numbering style
 * @return    a Paragraph object
 * @since    iText 2.0.8
 */
public static Paragraph constructTitle(Paragraph title, ArrayList numbers, int numberDepth, int numberStyle) {
  if (title == null) {
    return null;
  }
  int depth = Math.min(numbers.size(), numberDepth);
  if (depth < 1) {
    return title;
  }
  StringBuffer buf = new StringBuffer(" ");
  for (int i = 0; i < depth; i++) {
    buf.insert(0, ".");
    buf.insert(0, ((Integer) numbers.get(i)).intValue());
  }
  if (numberStyle == NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT) {
    buf.deleteCharAt(buf.length() - 2);
  }
  Paragraph result = new Paragraph(title);
  result.add(0, new Chunk(buf.toString(), title.getFont()));
  return result;
}

代码示例来源:origin: fr.opensagres.xdocreport/fr.opensagres.xdocreport.itext.extension

result.add( 0, new Chunk( buf.toString(), title.getFont() ) );
return result;

代码示例来源:origin: fr.opensagres.xdocreport/fr.opensagres.xdocreport.itext.extension-gae

result.add( 0, new Chunk( buf.toString(), title.getFont() ) );
return result;

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

write(section.getTitle().getFont(), styleAttributes);
String alignment = HtmlEncoder.getAlignment(section.getTitle().getAlignment());
if (!"".equals(alignment)) {
currentfont.push(section.getTitle().getFont());

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

write(section.getTitle().getFont(), styleAttributes);
String alignment = HtmlEncoder.getAlignment(section.getTitle().getAlignment());
if (!"".equals(alignment)) {
currentfont.push(section.getTitle().getFont());

代码示例来源:origin: com.github.librepdf/pdf-html

write(section.getTitle().getFont(), styleAttributes);
String alignment = HtmlEncoder.getAlignment(section.getTitle().getAlignment());
if (!"".equals(alignment)) {
currentfont.push(section.getTitle().getFont());

代码示例来源:origin: com.github.bengolder/pdf-rtf

super(doc);
RtfFont baseFont = null;
if(paragraph.getFont() instanceof RtfParagraphStyle) {
  this.paragraphStyle = this.document.getDocumentHeader().getRtfParagraphStyle(((RtfParagraphStyle) paragraph.getFont()).getStyleName());
  baseFont = this.paragraphStyle;
} else {
  baseFont = new RtfFont(this.document, paragraph.getFont());
  this.paragraphStyle = new RtfParagraphStyle(this.document, this.document.getDocumentHeader().getRtfParagraphStyle("Normal"));
  this.paragraphStyle.setAlignment(paragraph.getAlignment());

代码示例来源:origin: org.jboss.itext/itext-rtf

super(doc);
RtfFont baseFont = null;
if(paragraph.getFont() instanceof RtfParagraphStyle) {
  this.paragraphStyle = this.document.getDocumentHeader().getRtfParagraphStyle(((RtfParagraphStyle) paragraph.getFont()).getStyleName());
  baseFont = this.paragraphStyle;
} else {
  baseFont = new RtfFont(this.document, paragraph.getFont());
  this.paragraphStyle = new RtfParagraphStyle(this.document, this.document.getDocumentHeader().getRtfParagraphStyle("Normal"));
  this.paragraphStyle.setAlignment(paragraph.getAlignment());

代码示例来源:origin: com.github.librepdf/pdf-html

write(HtmlTags.ALIGN, alignment);
write(paragraph.getFont(), styleAttributes);
os.write(GT);
currentfont.push(paragraph.getFont());

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

write(HtmlTags.ALIGN, alignment);
write(paragraph.getFont(), styleAttributes);
os.write(GT);
currentfont.push(paragraph.getFont());

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

write(HtmlTags.ALIGN, alignment);
write(paragraph.getFont(), styleAttributes);
os.write(GT);
currentfont.push(paragraph.getFont());

代码示例来源:origin: be.fedict.eid-applet/eid-applet-service

titleParagraph.setAlignment(Paragraph.ALIGN_CENTER);
Font titleFont = titleParagraph.getFont();
titleFont.setSize((float) 20.0);
titleFont.setStyle(Font.BOLD);

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

addSpacing(paragraph.getSpacingBefore(), leading, paragraph.getFont());
  element.process(this);
  carriageReturn();
  addSpacing(paragraph.getSpacingAfter(), paragraph.getTotalLeading(), paragraph.getFont());

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

addSpacing(paragraph.getSpacingBefore(), leading, paragraph.getFont());
  element.process(this);
  carriageReturn();
  addSpacing(paragraph.getSpacingAfter(), paragraph.getTotalLeading(), paragraph.getFont());

代码示例来源:origin: com.github.librepdf/openpdf

addSpacing(paragraph.getSpacingBefore(), leading, paragraph.getFont());
  element.process(this);
  carriageReturn();
  addSpacing(paragraph.getSpacingAfter(), paragraph.getTotalLeading(), paragraph.getFont());

相关文章