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

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

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

Paragraph.getSpacingBefore介绍

暂无

代码示例

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Gets the spacing before this paragraph.
 *
 * @return    the spacing
 * @deprecated As of iText 2.1.5, replaced by {@link #getSpacingBefore()},
 * scheduled for removal at 2.3.0
 */
@Deprecated
public float spacingBefore() {
  return getSpacingBefore();
}

代码示例来源:origin: com.itextpdf/itextg

/**
 * Gets the spacing before this paragraph.
 *
 * @return    the spacing
 * @deprecated As of iText 2.1.5, replaced by {@link #getSpacingBefore()},
 * scheduled for removal at 2.3.0
 */
@Deprecated
public float spacingBefore() {
  return getSpacingBefore();
}

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

public void setSpacingBefore( Paragraph paragraph )
{
  setSpacingBefore( paragraph.getSpacingBefore() );
}

代码示例来源:origin: com.itextpdf/itextpdf

switch (e.type()) {
  case Element.PTABLE:
    ((PdfPTable) e).setSpacingBefore(getSpacingBefore());
    break;
  case Element.PARAGRAPH:
    ((Paragraph) e).setSpacingBefore(getSpacingBefore());
    break;
  case Element.LIST:
    ListItem firstItem = ((List)e).getFirstItem();
    if (firstItem != null) {
      firstItem.setSpacingBefore(getSpacingBefore());

代码示例来源:origin: com.itextpdf/itextg

switch (e.type()) {
  case Element.PTABLE:
    ((PdfPTable) e).setSpacingBefore(getSpacingBefore());
    break;
  case Element.PARAGRAPH:
    ((Paragraph) e).setSpacingBefore(getSpacingBefore());
    break;
  case Element.LIST:
    ListItem firstItem = ((List)e).getFirstItem();
    if (firstItem != null) {
      firstItem.setSpacingBefore(getSpacingBefore());

代码示例来源:origin: com.itextpdf/itextg

/**
 * Constructs a <CODE>Paragraph</CODE> with a certain <CODE>Phrase</CODE>.
 *
 * @param    phrase        a <CODE>Phrase</CODE>
 */
public Paragraph(Phrase phrase) {
  super(phrase);
  if (phrase instanceof Paragraph) {
    Paragraph p = (Paragraph)phrase;
    setAlignment(p.alignment);
    setIndentationLeft(p.getIndentationLeft());
    setIndentationRight(p.getIndentationRight());
    setFirstLineIndent(p.getFirstLineIndent());
    setSpacingAfter(p.getSpacingAfter());
    setSpacingBefore(p.getSpacingBefore());
    setExtraParagraphSpace(p.getExtraParagraphSpace());
    setRole(p.role);
    id = p.getId();
    if (p.accessibleAttributes != null)
      accessibleAttributes = new HashMap<PdfName, PdfObject>(p.accessibleAttributes);
  }
}

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Constructs a <CODE>Paragraph</CODE> with a certain <CODE>Phrase</CODE>.
 *
 * @param    phrase        a <CODE>Phrase</CODE>
 */
public Paragraph(Phrase phrase) {
  super(phrase);
  if (phrase instanceof Paragraph) {
    Paragraph p = (Paragraph)phrase;
    setAlignment(p.alignment);
    setIndentationLeft(p.getIndentationLeft());
    setIndentationRight(p.getIndentationRight());
    setFirstLineIndent(p.getFirstLineIndent());
    setSpacingAfter(p.getSpacingAfter());
    setSpacingBefore(p.getSpacingBefore());
    setExtraParagraphSpace(p.getExtraParagraphSpace());
    setRole(p.role);
    id = p.getId();
    if (p.accessibleAttributes != null)
      accessibleAttributes = new HashMap<PdfName, PdfObject>(p.accessibleAttributes);
  }
}

代码示例来源:origin: com.itextpdf/itextpdf

this.setAttribute(PdfName.O, PdfName.LAYOUT);
if (Float.compare(paragraph.getSpacingBefore(), 0f) != 0)
  this.setAttribute(PdfName.SPACEBEFORE, new PdfNumber(paragraph.getSpacingBefore()));
if (Float.compare(paragraph.getSpacingAfter(), 0f) != 0)
  this.setAttribute(PdfName.SPACEAFTER, new PdfNumber(paragraph.getSpacingAfter()));

代码示例来源:origin: com.itextpdf/itextg

this.setAttribute(PdfName.O, PdfName.LAYOUT);
if (Float.compare(paragraph.getSpacingBefore(), 0f) != 0)
  this.setAttribute(PdfName.SPACEBEFORE, new PdfNumber(paragraph.getSpacingBefore()));
if (Float.compare(paragraph.getSpacingAfter(), 0f) != 0)
  this.setAttribute(PdfName.SPACEAFTER, new PdfNumber(paragraph.getSpacingAfter()));

代码示例来源:origin: com.itextpdf/itextpdf

protected void populateProperties(Paragraph copy, boolean spacingBefore) {
  copy.setFont(getFont());
  copy.setAlignment(getAlignment());
  copy.setLeading(getLeading(), multipliedLeading);
  copy.setIndentationLeft(getIndentationLeft());
  copy.setIndentationRight(getIndentationRight());
  copy.setFirstLineIndent(getFirstLineIndent());
  copy.setSpacingAfter(getSpacingAfter());
  if (spacingBefore)
    copy.setSpacingBefore(getSpacingBefore());
  copy.setExtraParagraphSpace(getExtraParagraphSpace());
  copy.setRole(role);
  copy.id = getId();
  if (accessibleAttributes != null)
    copy.accessibleAttributes = new HashMap<PdfName, PdfObject>(accessibleAttributes);
  copy.setTabSettings(getTabSettings());
  copy.setKeepTogether(getKeepTogether());
}

代码示例来源:origin: com.itextpdf/itextg

protected void populateProperties(Paragraph copy, boolean spacingBefore) {
  copy.setFont(getFont());
  copy.setAlignment(getAlignment());
  copy.setLeading(getLeading(), multipliedLeading);
  copy.setIndentationLeft(getIndentationLeft());
  copy.setIndentationRight(getIndentationRight());
  copy.setFirstLineIndent(getFirstLineIndent());
  copy.setSpacingAfter(getSpacingAfter());
  if (spacingBefore)
    copy.setSpacingBefore(getSpacingBefore());
  copy.setExtraParagraphSpace(getExtraParagraphSpace());
  copy.setRole(role);
  copy.id = getId();
  if (accessibleAttributes != null)
    copy.accessibleAttributes = new HashMap<PdfName, PdfObject>(accessibleAttributes);
  copy.setTabSettings(getTabSettings());
  copy.setKeepTogether(getKeepTogether());
}

代码示例来源:origin: com.itextpdf/itextpdf

compositeColumn.addText(para);
if (!(firstPass && adjustFirstLine)) {
  yLine -= para.getSpacingBefore();

代码示例来源:origin: com.itextpdf/itextg

compositeColumn.addText(para);
if (!(firstPass && adjustFirstLine)) {
  yLine -= para.getSpacingBefore();

代码示例来源:origin: com.itextpdf/itextg

text.openMCBlock(paragraph);
addSpacing(paragraph.getSpacingBefore(), leading, paragraph.getFont());

代码示例来源:origin: com.itextpdf/itextpdf

text.openMCBlock(paragraph);
addSpacing(paragraph.getSpacingBefore(), leading, paragraph.getFont());

相关文章