当前位置: 首页>>代码示例>>Java>>正文


Java PdfPCell.setUseAscender方法代码示例

本文整理汇总了Java中com.itextpdf.text.pdf.PdfPCell.setUseAscender方法的典型用法代码示例。如果您正苦于以下问题:Java PdfPCell.setUseAscender方法的具体用法?Java PdfPCell.setUseAscender怎么用?Java PdfPCell.setUseAscender使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.itextpdf.text.pdf.PdfPCell的用法示例。


在下文中一共展示了PdfPCell.setUseAscender方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getFillCell

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
public PdfPCell getFillCell(){
	PdfPCell fillCell = new PdfPCell();
	fillCell.setBorderWidth( 0f );
	fillCell.setLeft(0);
	fillCell.setTop(0);
	fillCell.setRight( 0 );
	fillCell.setBottom( 0 );
	fillCell.setUseAscender( true );
	fillCell.setIndent(0);
	fillCell.setHorizontalAlignment( Element.ALIGN_LEFT );
	fillCell.setVerticalAlignment( Element.ALIGN_BOTTOM );
	fillCell.setPaddingLeft( 0f);
	fillCell.setPaddingBottom(0f);
	fillCell.setPaddingRight(0f );
	fillCell.setPaddingTop( 0f );
	fillCell.setBorder( 0 );
	renderEmptyCell(fillCell);
	
	return fillCell;
}
 
开发者ID:Billes,项目名称:pdf-renderer,代码行数:21,代码来源:CellFactory.java

示例2: createCell

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
public PdfPCell createCell( Block block ){
	float[] margins = block.getMargins();
	PdfPCell cell =  new PdfPCell();
	cell.setBorderWidth(0);
	cell.setVerticalAlignment( VerticalAlign.getByName(block.getVerticalAlign()).getAlignment() );
	cell.setLeft(0);
	cell.setTop(0);
	cell.setRight(0);
	cell.setBottom(0);
	cell.setUseAscender( block.isUseAscender() );
	cell.setIndent(0);
	cell.setPaddingLeft( SizeFactory.millimetersToPostscriptPoints( margins[0]) );
	cell.setPaddingBottom( SizeFactory.millimetersToPostscriptPoints(margins[3]) );
	cell.setPaddingRight( SizeFactory.millimetersToPostscriptPoints(margins[1]) );
	cell.setPaddingTop( SizeFactory.millimetersToPostscriptPoints(margins[2]) );
	cell.setFixedHeight(SizeFactory.millimetersToPostscriptPoints( block.getPosition()[3] ));
	cell.setBorder(0);
	cell.setCellEvent( new CellBlockEvent().createEvent(block));
	cell.setRotation( block.getRotation() );
	return cell;
}
 
开发者ID:Billes,项目名称:pdf-renderer,代码行数:22,代码来源:CellFactory.java

示例3: getCell

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
/**
 * Create a cell with the factory element attributes applied
 * @return A cell with the element attributes applied
 */
public PdfPCell getCell() {
  PdfPCell lCell = new PdfPCell();
  lCell.setUseAscender(false);
  lCell.setUseDescender(true);
  lCell.getColumn().setAdjustFirstLine(mElementAttributes.getCellAttributes().isAdjustFirstLine());
  lCell.setBorder(mElementAttributes.getCellAttributes().getBorder());
  lCell.setPaddingTop(mElementAttributes.getCellAttributes().getPaddingTop());
  lCell.setPaddingRight(mElementAttributes.getCellAttributes().getPaddingRight());
  lCell.setPaddingBottom(mElementAttributes.getCellAttributes().getPaddingBottom());
  lCell.setPaddingLeft(mElementAttributes.getCellAttributes().getPaddingLeft());
  lCell.setBackgroundColor(mElementAttributes.getCellAttributes().getBackgroundColor());

  return lCell;
}
 
开发者ID:Fivium,项目名称:FOXopen,代码行数:19,代码来源:ElementFactory.java

示例4: createLegendCell

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
/**
 * Creates a PDF cell for the legend table.
 *
 * @param content
 *         the content text.
 * @param bgColor
 *         the background color to use.
 * @return the created PDF cell.
 */
private static PdfPCell createLegendCell(String content, BaseColor bgColor) {
    PdfPCell cell = ReportServiceHelper.createTableCell(content,
            ReportServiceHelper.PDF_REPORT_CONTENT_FONT, bgColor,
            ReportServiceHelper.PDF_ALIGN_LEFT,
            ReportServiceHelper.PDF_NO_BORDER, 0);
    cell.setUseAscender(true);
    cell.setHorizontalAlignment(com.itextpdf.text.Element.ALIGN_MIDDLE);
    return cell;
}
 
开发者ID:NASA-Tournament-Lab,项目名称:CoECI-OPM-Service-Credit-Redeposit-Deposit-Application,代码行数:19,代码来源:CalculationAuditTrailReportService.java

示例5: onRender

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
@Override
public void onRender( PdfPCell cell ) throws PdfRenderException{
	
	
	PdfPTable table = new PdfPTable( widths.length  );

	
	
	try{
		table.setTotalWidth( getTotalWidthsAsPs() );
		table.setLockedWidth( true );
		table.setSpacingAfter( 0f );

		for( AbstractParagraph tableCell : cells ){

			PdfPCell c = new PdfPCell();
			float[] padding = new float[]{0f,0f,0f,0f}; 
			if( tableCell instanceof TableCell ){
				padding = ((TableCell) tableCell).getPadding();
			}
			c.setBorderWidth( 0f );
			c.setLeft(0);
			c.setTop(0);
			c.setRight( 0 );
			c.setBottom( 0 );
			c.setUseAscender( true );
			c.setIndent(0);
			c.setHorizontalAlignment( Element.ALIGN_LEFT );
			c.setVerticalAlignment( Element.ALIGN_TOP );
			c.setPaddingLeft( SizeFactory.millimetersToPostscriptPoints(padding[0]));
			c.setPaddingBottom( SizeFactory.millimetersToPostscriptPoints(padding[3]) );
			c.setPaddingRight( SizeFactory.millimetersToPostscriptPoints(padding[2])  );
			c.setPaddingTop(SizeFactory.millimetersToPostscriptPoints(padding[1]));
			c.setBorder( 0 );
			tableCell.onRender( c );
			
			table.addCell( c );
			
	
		}
		cell.addElement( table );
	}catch( Exception e ){
		throw new PdfRenderException(e);
	}
}
 
开发者ID:Billes,项目名称:pdf-renderer,代码行数:46,代码来源:TableParagraph.java


注:本文中的com.itextpdf.text.pdf.PdfPCell.setUseAscender方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。