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


Java PdfPCell.setPaddingBottom方法代码示例

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


在下文中一共展示了PdfPCell.setPaddingBottom方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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(String value, Font font, int align, int colspan, boolean boderFlag) {
    PdfPCell cell = new PdfPCell();
    cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
    cell.setHorizontalAlignment(align);
    cell.setColspan(colspan);
    cell.setPhrase(new Phrase(value, font));
    cell.setPadding(3.0f);
    if (!boderFlag) {
        cell.setBorder(0);
        cell.setPaddingTop(15.0f);
        cell.setPaddingBottom(8.0f);
    }
    return cell;
}
 
开发者ID:melonlee,项目名称:PowerApi,代码行数:15,代码来源:PDFTest.java

示例3: 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

示例4: generateMapImage

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPCell generateMapImage() throws IOException, DocumentException {
    PdfPCell cell = new PdfPCell(imageMap(data.mapUrl), true);
    cell.setBorder(0);
    cell.setPaddingTop(10);
    cell.setPaddingBottom(10);
    cell.setPaddingLeft(5);
    cell.setColspan(6);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:10,代码来源:DataPageGenerator.java

示例5: addFileWithSectionValue

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private void addFileWithSectionValue(PdfPTable table, String fileName, String content) {
    PdfPCell cell = new PdfPCell(new Phrase(fileName, fileNameFont));
    cell.setPaddingBottom(5f);
    table.addCell(cell);
    PdfPCell cell2 = new PdfPCell(new Phrase(content, contentFont));
    cell2.setPaddingBottom(5f);
    table.addCell(cell2);
}
 
开发者ID:victorward,项目名称:recruitervision,代码行数:9,代码来源:PDFCreator.java

示例6: dataTableTitile

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private void dataTableTitile(Document documento, String data) throws IOException, BadElementException, DocumentException {
    
   try {
       pTableEmpresaPricipal = new PdfPTable(new float[]{15f, 85f});
       pTableEmpresaInforImpres1 = new PdfPTable(1);
       pTableEmpresaInforImpres5 = new PdfPTable(1);
       
       PdfPCell pCellNomeEmpresa = new PdfPCell(new Phrase(Empresa.NOME, fontCabecalhoNG));
       pCellNomeEmpresa.setBorder(0);
       PdfPCell pCellNomeEndereco = new PdfPCell(new Phrase(Empresa.ENDERECO, fontCabecalhoN));
       pCellNomeEndereco.setBorder(0);
       PdfPCell pCellCaixaPostal = new PdfPCell(new Phrase(Empresa.CAIXAPOSTAL, fontCabecalhoN));
       pCellCaixaPostal.setBorder(0);
       PdfPCell pCellTeleFax = new PdfPCell(new Phrase(Empresa.TELEFAX + " " + ConfigDoc.Empresa.EMAIL, fontCabecalhoN));
       pCellTeleFax.setBorder(0);
       PdfPCell pCellSociedade = new PdfPCell(new Phrase(Empresa.SOCIEDADE, fontCabecalhoN));
       pCellSociedade.setBorder(0);
       Image imageEmpresa = Image.getInstance("logo.png");
       imageEmpresa.scaleToFit(120f, 85f);
       pTableEmpresaInforImpres1.addCell(pCellNomeEmpresa);
       pTableEmpresaInforImpres1.addCell(pCellNomeEndereco);
       pTableEmpresaInforImpres1.addCell(pCellCaixaPostal);
       pTableEmpresaInforImpres1.addCell(pCellTeleFax);
       pTableEmpresaInforImpres1.addCell(pCellSociedade);
       PdfPCell cellTabela3 = new PdfPCell(pTableEmpresaInforImpres1);
       cellTabela3.setBorder(0);
       pTableEmpresaInforImpres5.addCell(cellTabela3);
       PdfPCell cellTabela5 = new PdfPCell(pTableEmpresaInforImpres5);
       cellTabela5.setBorder(0);
       PdfPCell cellTabela6 = new PdfPCell(imageEmpresa);
       cellTabela6.setBorder(0);
       pTableEmpresaPricipal.setWidthPercentage(95);
       pTableEmpresaPricipal.addCell(cellTabela6);
       pTableEmpresaPricipal.addCell(cellTabela5);
       PdfPTable pTableTitulo = new PdfPTable(1);
       pTableTitulo.setHorizontalAlignment(Element.ALIGN_CENTER);
       pTableTitulo.setWidthPercentage(100);
       
       SimpleDateFormat sdfEsp = new SimpleDateFormat("MMMM, yyyy", Locale.ENGLISH);
       SimpleDateFormat sdf = new SimpleDateFormat("MM-yyyy");
       PdfPCell cellTitulo = new PdfPCell(new Phrase("TOTAL PREMIUM COLLECTED ON TRAVEL INSURANCE AND TAXES FOR "+sdfEsp.format(sdf.parse(data)).toUpperCase(), fontCorpoNG));
       cellTitulo.setBorder(0);
       cellTitulo.setPaddingBottom(10f);
       pTableTitulo.addCell(cellTitulo);
       
       pTableEmpresaPricipal.setHorizontalAlignment(Element.ALIGN_CENTER);
       
       documento.add(pTableEmpresaPricipal);
       documento.add(pTableNull);
       documento.add(pTableTitulo);
   } catch (ParseException ex) {
       Logger.getLogger(ExporOnlyViagemPdf.class.getName()).log(Level.SEVERE, null, ex);
   }
}
 
开发者ID:JIGAsoftSTP,项目名称:NICON,代码行数:55,代码来源:ExporOnlyViagemPdf.java

示例7: 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

示例8: generateTableOfContentsTitle

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPCell generateTableOfContentsTitle() throws IOException, DocumentException {
    PdfPCell cell = new PdfPCell(PhraseUtil.phrase("Spis treści", 18, Font.BOLD));
    cell.setBorder(0);
    cell.setPaddingBottom(10);
    cell.setHorizontalAlignment(Element.ALIGN_LEFT);
    cell.setColspan(4);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:9,代码来源:TableOfContentsPageGenerator.java

示例9: generateTableOfContentsValue

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPCell generateTableOfContentsValue(String value) throws IOException, DocumentException {
    PdfPCell cell = new PdfPCell(PhraseUtil.phrase(value, 12, Font.BOLD));
    cell.setBorder(0);
    cell.setHorizontalAlignment(Element.ALIGN_LEFT);
    cell.setPaddingBottom(3);
    cell.setPaddingLeft(10);
    cell.setColspan(3);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:10,代码来源:TableOfContentsPageGenerator.java

示例10: generateTableOfContentsKey

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPCell generateTableOfContentsKey(String key) throws IOException, DocumentException {
    PdfPCell cell = new PdfPCell(PhraseUtil.phrase(key, 12, Font.BOLD));
    cell.setBorder(0);
    cell.setBorderWidthBottom(1);
    cell.setBorderColor(BaseColor.LIGHT_GRAY);
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setPaddingBottom(3);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:10,代码来源:TableOfContentsPageGenerator.java

示例11: generateImageCell

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPCell generateImageCell() throws DocumentException, IOException, URISyntaxException {
    Image image = ImageUtils.readImageFromResources("first-page.jpg");
    Image imageCropped = ImageUtils.cropImageToMeetRatio(pdfWriter, image, 100f / 150f);

    PdfPCell cell = new PdfPCell(imageCropped, true);
    cell.setPaddingTop(10);
    cell.setPaddingBottom(10);
    cell.setBorder(0);
    cell.setHorizontalAlignment(Element.ALIGN_MIDDLE);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:12,代码来源:FirstPageGenerator.java

示例12: generateTitleCell

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPCell generateTitleCell() throws IOException, DocumentException {
    //PdfPCell cell = new PdfPCell(PhraseUtil.phrase("Kolekcjoner pieczątek", 25, Font.BOLD));
    PdfPCell cell = new PdfPCell(PhraseUtil.phrase(" ", 25, Font.BOLD));
    cell.setBorder(0);
    cell.setPaddingTop(130);
    cell.setPaddingBottom(20);
    cell.setPaddingLeft(20);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    cell.setVerticalAlignment(Element.ALIGN_CENTER);
    cell.setBackgroundColor(BackgroundColorGenerator.DEFAULT_BACKGROUND_COLOR);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:13,代码来源:FirstPageGenerator.java

示例13: generateHeaderTitle

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPCell generateHeaderTitle() throws IOException, DocumentException {
    PdfPCell cell = new PdfPCell(phrase(data.title, 15, Font.BOLD));
    cell.setBorder(0);
    cell.setPaddingTop(10);
    cell.setPaddingBottom(10);
    cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
    cell.setColspan(7);
    cell.setBackgroundColor(backgroundColor);
    cell.setPaddingLeft(10);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:12,代码来源:DataPageGenerator.java

示例14: generateDescription

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPCell generateDescription() throws IOException, DocumentException {
    PdfPCell cell = new PdfPCell(phrase(data.description, 14));
    cell.setHorizontalAlignment(Element.ALIGN_JUSTIFIED);
    cell.setBorder(0);
    cell.setPaddingTop(10);
    cell.setPaddingBottom(15);
    cell.setBackgroundColor(backgroundColor);
    cell.setPaddingRight(10);
    cell.setPaddingLeft(10);
    cell.setColspan(12);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:13,代码来源:DataPageGenerator.java

示例15: generateTile

import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
public PdfPCell generateTile() throws IOException, DocumentException {
    PdfPCell cell = new PdfPCell(PhraseUtil.phrase("- " + pageNumber + " -"));
    cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
    cell.setVerticalAlignment(Element.ALIGN_CENTER);
    cell.setBorder(0);
    cell.setPadding(5);
    cell.setPaddingRight(10);
    cell.setPaddingBottom(9);
    cell.setBackgroundColor(backgroundColor);
    return cell;
}
 
开发者ID:lenrok258,项目名称:MountainQuest-PL,代码行数:12,代码来源:PageNumberCellGenerator.java


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