當前位置: 首頁>>代碼示例>>Java>>正文


Java Paragraph.setLeading方法代碼示例

本文整理匯總了Java中com.itextpdf.text.Paragraph.setLeading方法的典型用法代碼示例。如果您正苦於以下問題:Java Paragraph.setLeading方法的具體用法?Java Paragraph.setLeading怎麽用?Java Paragraph.setLeading使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.itextpdf.text.Paragraph的用法示例。


在下文中一共展示了Paragraph.setLeading方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getObjectDescription

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private Paragraph getObjectDescription() 
{

	Paragraph p = new Paragraph();
	p.setLeading(0, 1.2f);
	p.setAlignment(Element.ALIGN_JUSTIFIED);
       p.setSpacingAfter(10);
       p.setSpacingBefore(50);
       
	if(o.getDescription()!=null){
		p.add(new Chunk(o.getDescription(), bodyFont));
	}
	else{
		p.add(new Chunk("No description recorded", bodyFont));
	}
	
	return p;
}
 
開發者ID:ltrr-arizona-edu,項目名稱:tellervo,代碼行數:19,代碼來源:ProSheet.java

示例2: getSeriesComments

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private Paragraph getSeriesComments() 
{


	Paragraph p = new Paragraph();
	
	if(s.getSeries().getComments()!=null){
		
		p.setLeading(0, 1.2f);
		p.add(new Chunk("Comments: \n", subSubSectionFont));
		p.add(new Chunk(s.getSeries().getComments(), bodyFont));
		return p;
	}
	else
	{
		return p;
	}
	
	
}
 
開發者ID:ltrr-arizona-edu,項目名稱:tellervo,代碼行數:21,代碼來源:SeriesReport.java

示例3: getObjectComments

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private Paragraph getObjectComments() 
{

	Paragraph p = new Paragraph();
	p.setLeading(0, 1.2f);
	p.setAlignment(Element.ALIGN_JUSTIFIED);
       p.setSpacingAfter(10);
	
	if(o.getComments()!=null){
		p.add(new Chunk("Notes: ", commentFont));
		p.add(new Chunk(o.getComments(), commentFont));
	}

	
	return p;
}
 
開發者ID:ltrr-arizona-edu,項目名稱:tellervo,代碼行數:17,代碼來源:ProSheet.java

示例4: getComments

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private Paragraph getComments(WSIBox b) throws DocumentException
{

	Paragraph p = new Paragraph();
	p.setLeading(0, 1.2f);
	
	p.add(new Chunk("Comments: \n", subSubSectionFont));
	if(b.getComments()!=null){
		p.add(new Chunk(b.getComments(), bodyFont));
	}
	else{
		p.add(new Chunk("No comments recorded", bodyFont));
	}
	
	return(p);
}
 
開發者ID:ltrr-arizona-edu,項目名稱:tellervo,代碼行數:17,代碼來源:CompleteBoxLabel.java

示例5: addContent

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private void addContent(PdfWriter writer) throws DocumentException, PdfFormatierungsException {		
	Anchor anchor = new Anchor("Lernentwicklungsbericht", lernentwicklungsberichtUeberschriftFont);
	Chapter chapterLEB = new Chapter(new Paragraph(anchor), 1);
	chapterLEB.setNumberDepth(0);
	Paragraph paragraphHeader = new Paragraph();
	paragraphHeader.setLeading(FIXED_LEADING_TEXT, 1);
	sectionCount += 1;
	Section headerSection = chapterLEB.addSection(paragraphHeader);
	headerSection.setNumberDepth(0);

	paragraphHeader.add(Chunk.NEWLINE);
	paragraphHeader.add(PdfFormatHelper.buildHeaderNameLine(lebData.getSchuelername() , headerFont));
	paragraphHeader.add(Chunk.NEWLINE);
	paragraphHeader.add(PdfFormatHelper.buildHeaderKlassendatenLine(lebData, headerFont));
	headerSection.add(Chunk.NEWLINE);		
	headerSection.add(Chunk.NEWLINE);
	document.add(chapterLEB);
	insertDummyLineIfNecessary(writer);
	
	addKlassenbrief(chapterLEB, writer);
	addIndividuelleEinschaetzung(chapterLEB, writer);
	addFacheinschaetzungen(chapterLEB, writer);
}
 
開發者ID:fossaag,項目名稱:rolp,代碼行數:24,代碼來源:PdfStreamSource.java

示例6: addIndividuelleEinschaetzung

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private void addIndividuelleEinschaetzung(Chapter chapterLEB, PdfWriter writer) throws DocumentException, PdfFormatierungsException {
	if (!lebData.getIndividuelleEinschaetzung().isEmpty()) {
		sectionCount += 1;
		breakHurenkind(writer);
		breakSchusterjunge(writer);
		Paragraph paragraphIndividuelleEinschaetzung = new Paragraph();
		Section individuelleEinschaetzungsTextSection = chapterLEB.addSection(paragraphIndividuelleEinschaetzung);
		individuelleEinschaetzungsTextSection.setNumberDepth(0);
		Paragraph schuelereinschaetzungParapgraph = new Paragraph(lebData.getIndividuelleEinschaetzung().replace('\t', '\0'), standardTextFont);
		schuelereinschaetzungParapgraph.setAlignment(Element.ALIGN_JUSTIFIED);
		schuelereinschaetzungParapgraph.setLeading(FIXED_LEADING_TEXT, zeilenabstandsfaktor);
		individuelleEinschaetzungsTextSection.add(schuelereinschaetzungParapgraph);			
		document.add(individuelleEinschaetzungsTextSection);
		document.add(getKlassenlehrerunterschrift(chapterLEB));
		alertHurenkind(writer);
		insertDummyLineIfNecessary(writer);
	}
}
 
開發者ID:fossaag,項目名稱:rolp,代碼行數:19,代碼來源:PdfStreamSource.java

示例7: addKlassenbrief

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private void addKlassenbrief(Chapter chapterLEB, PdfWriter writer) throws DocumentException, PdfFormatierungsException {
	if (!lebData.getKlassenbrief().isEmpty()) {
		sectionCount += 1;
		breakSchusterjunge(writer);
		Paragraph paragraphKlassenbrief = new Paragraph();
		Section klassenbriefSection = chapterLEB.addSection(paragraphKlassenbrief);
		klassenbriefSection.setNumberDepth(0);
		Paragraph klasseneinschaetzungParapgraph = new Paragraph(lebData.getKlassenbrief().replace('\t', '\0'), standardTextFont);
		klasseneinschaetzungParapgraph.setAlignment(Element.ALIGN_JUSTIFIED);
		klasseneinschaetzungParapgraph.setLeading(FIXED_LEADING_TEXT, zeilenabstandsfaktor);
		klasseneinschaetzungParapgraph.add(Chunk.NEWLINE);
		if (lebData.getIndividuelleEinschaetzung().isEmpty()) {
			klassenbriefSection.add(klasseneinschaetzungParapgraph);
			document.add(klassenbriefSection);
			document.add(getKlassenlehrerunterschrift(chapterLEB));
		} else {
			klasseneinschaetzungParapgraph.add(Chunk.NEWLINE);
			klassenbriefSection.add(klasseneinschaetzungParapgraph);
			document.add(klassenbriefSection);
		}
		alertLonelyHeader(writer);
		insertDummyLineIfNecessary(writer);
	}
}
 
開發者ID:fossaag,項目名稱:rolp,代碼行數:25,代碼來源:PdfStreamSource.java

示例8: CreatePDF_3DPrinter

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
public CreatePDF_3DPrinter(File file, ArrayList<String> infos, ArrayList<Image> imagelist) throws DocumentException, MalformedURLException, IOException{
	result = file;
	MyPDF = new Document(PageSize.A4, 50, 50, 80, 80);
	MyWriter = PdfWriter.getInstance(MyPDF,new FileOutputStream(result));
	MyWriter.setInitialLeading(160);
	MyPDF.open();
	Font font = new Font(Font.FontFamily.TIMES_ROMAN, 40, Font.NORMAL);
	Paragraph pg = new Paragraph();
	pg.setAlignment(Element.ALIGN_CENTER);
	pg.setSpacingAfter(150);
	pg.setFont(font);
	pg.add(infos.get(0));	
	pg.setLeading(2,1);
	MyPDF.add(pg);
	Image image = Image.getInstance(loadImage("/logo.png"), null);
	image.setAbsolutePosition((MyPDF.getPageSize().getWidth()/2) - (image.getWidth()/2), 580f);
	if(infos.get(0).length()<25){
		image.setAbsolutePosition((MyPDF.getPageSize().getWidth()/2) - (image.getWidth()/2), 620f);
	}
       MyPDF.add(image);
	MyPDF.add(createFrontPageTable(infos));
	
	if(imagelist!=null){
		tilingImages(imagelist);
	}
	MyPDF.close();
}
 
開發者ID:AlexandrePechereau,項目名稱:FabDocMaker,代碼行數:28,代碼來源:CreatePDF_3DPrinter.java

示例9: CreatePDF_LaserCutting

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
public CreatePDF_LaserCutting(File file, ArrayList<String> infos, ArrayList<Image> imagelist) throws DocumentException, MalformedURLException, IOException{
	result = file;
	MyPDF = new Document(PageSize.A4, 50, 50, 80, 80);
	MyWriter = PdfWriter.getInstance(MyPDF,new FileOutputStream(result));
	MyWriter.setInitialLeading(160);
	MyPDF.open();
	Font font = new Font(Font.FontFamily.TIMES_ROMAN, 40, Font.NORMAL);
	Paragraph pg = new Paragraph();
	pg.setAlignment(Element.ALIGN_CENTER);
	pg.setSpacingAfter(150);
	pg.setFont(font);
	pg.add(infos.get(0));	
	pg.setLeading(2,1);
	MyPDF.add(pg);
	Image image = Image.getInstance(loadImage("/logo.png"), null);
	image.setAbsolutePosition((MyPDF.getPageSize().getWidth()/2) - (image.getWidth()/2), 580f);
	if(infos.get(0).length()<25){
		image.setAbsolutePosition((MyPDF.getPageSize().getWidth()/2) - (image.getWidth()/2), 620f);
	}
       MyPDF.add(image);
	MyPDF.add(createFrontPageTable(infos));
	
	if(imagelist!=null){
		tilingImages(imagelist);
	}
	MyPDF.close();
}
 
開發者ID:AlexandrePechereau,項目名稱:FabDocMaker,代碼行數:28,代碼來源:CreatePDF_LaserCutting.java

示例10: getTitlePDF

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
/**
 * Get an iText Paragraph for the Title 
 * 
 * @return Paragraph
 */
private Paragraph getTitlePDF(WSIBox b)
{
	Paragraph p = new Paragraph();
	p.setLeading(0f); 
	p.setMultipliedLeading(1.2f);
	p.add(new Phrase(10, b.getTitle()+"\n", monsterFont));
	p.add(new Phrase(10, b.getComments()+" "+App.getLabName() +"fdas dfsa fds sdfalkdsf jlasdj fkljkldsa jfdsklaj fdksaj flkdsaj lkfdsalk fjdsal fjdklaj fkldsajkldsfalkjsdf asdlkj dsajlk", bodyFont));


	//p.add(new Chunk(b.getCurationLocation(), bodyFontLarge));
			
	return p;		
}
 
開發者ID:ltrr-arizona-edu,項目名稱:tellervo,代碼行數:19,代碼來源:BasicBoxLabel.java

示例11: getPhotoInParagraph

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
public static Paragraph getPhotoInParagraph(BufferedImage bufferedImage, float scalePercent, float spacingAbove) throws BadElementException, IOException {
	Paragraph paragraph = new Paragraph(" ", SUB_FONT);
	PdfPTable table = new PdfPTable(1);
	table.addCell(getPhotoCell(bufferedImage, scalePercent, true));
	paragraph.add(table);
	paragraph.setLeading(0);
	paragraph.setSpacingAfter(0);
	paragraph.setSpacingBefore(spacingAbove);
	return paragraph;
}
 
開發者ID:NimbleGen,項目名稱:bioinformatics,代碼行數:11,代碼來源:PdfReportUtil.java

示例12: getPhotosInParagraph

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
public static Paragraph getPhotosInParagraph(List<BufferedImage> bufferedImages, float scalePercent, boolean isHorizontallyCentered) throws BadElementException, IOException {
	Paragraph paragraph = new Paragraph(" ", SUB_FONT);
	PdfPTable table = new PdfPTable(1);
	for (BufferedImage bufferedImage : bufferedImages) {
		table.addCell(getPhotoCell(bufferedImage, scalePercent, isHorizontallyCentered));
	}
	table.setHorizontalAlignment(Element.ALIGN_CENTER);

	paragraph.add(table);
	paragraph.setLeading(0);
	paragraph.setSpacingAfter(0);
	paragraph.setSpacingBefore(0);
	return paragraph;
}
 
開發者ID:NimbleGen,項目名稱:bioinformatics,代碼行數:15,代碼來源:PdfReportUtil.java

示例13: getEnvelopeLabel

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
Paragraph getEnvelopeLabel(String text){
  Paragraph p = new Paragraph(text,FontFactory.getFont(FontFactory.HELVETICA, 18));
  p.setLeading(22);
  return p;
}
 
開發者ID:williamgrosset,項目名稱:OSCAR-ConCert,代碼行數:6,代碼來源:GenerateEnvelopesAction.java

示例14: getInterpretationPDF

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private Paragraph getInterpretationPDF()
{
	
	Paragraph p = new Paragraph();
	p.setLeading(0, 1.2f);
	Year firstyear = s.getSeries().getInterpretation().getFirstYear();
	Year pithYear = s.getSeries().getInterpretation().getPithYear();
	Year deathyear = s.getSeries().getInterpretation().getDeathYear();
	Boolean isRelativelyDated = false;
	p.add(new Chunk("Interpretation:", subSubSectionFont));
	
	String datingType = s.getSeries().getInterpretation().getDating().getType().toString();
	
	if(datingType=="RELATIVE") isRelativelyDated = true;
	
	if(firstyear!=null){
		p.add(new Chunk("\n- The first ring of this series begins in ", bodyFont));
		if(isRelativelyDated) p.add(new Chunk("relative year ", bodyFont));
		
		if (firstyear.getCertainty()!=null){
			p.add(new Chunk(firstyear.getCertainty().toString().toLowerCase() + " ", bodyFont));
		}
		p.add(new Chunk(firstyear.getValue().toString(), bodyFont));
		if(isRelativelyDated==false) p.add(new Chunk(firstyear.getSuffix().toString(), bodyFont));
		p.add(new Chunk(".\n", bodyFont));
	}
	
	if(pithYear!=null && deathyear!=null){
		p.add(new Chunk("- The pith of this radius was laid down ", bodyFont));
		if (pithYear.getCertainty()!=null){
			p.add(certaintyToNaturalString(pithYear.getCertainty().toString()));
		}
		if(isRelativelyDated) p.add(new Chunk("relative year ", bodyFont));
		p.add(new Chunk(pithYear.getValue().toString(), bodyFont));
		if(isRelativelyDated==false) p.add(new Chunk(pithYear.getSuffix().toString(), bodyFont));
		p.add(new Chunk(" and died ", bodyFont));
		if (deathyear.getCertainty()!=null){
			p.add(certaintyToNaturalString(deathyear.getCertainty().toString()));
		}
		if(isRelativelyDated) p.add(new Chunk("relative year ", bodyFont));
		p.add(new Chunk(deathyear.getValue().toString(), bodyFont));
		if(isRelativelyDated==false) p.add(new Chunk(deathyear.getSuffix().toString(), bodyFont));
		p.add(new Chunk(".\n", bodyFont));
		
	}
	
	
	// Dated with...
	if(s.getSeries().getInterpretation().getDatingReference()!=null)
	{
		p.add(new Chunk("\n- This series was dated using series: " + s.getSeries().getInterpretation().getDatingReference().getLinkSeries().getIdentifier().getValue().toString(), bodyFont));		
	}
	
	// Provence...
	if(s.getSeries().getInterpretation().getProvenance()!=null)
	{	
		p.add(new Chunk("\n- Provenance: " + s.getSeries().getInterpretation().getProvenance().toString(), bodyFont));
	}
			

	return p;		
}
 
開發者ID:ltrr-arizona-edu,項目名稱:tellervo,代碼行數:63,代碼來源:SeriesReport.java

示例15: addSpace

import com.itextpdf.text.Paragraph; //導入方法依賴的package包/類
private void addSpace(Document document) throws DocumentException {
    Paragraph dummy = new Paragraph("\u00a0");
    dummy.setLeading(TITLE_PADDING);
    document.add(dummy);
}
 
開發者ID:krispena,項目名稱:cbsp-reports,代碼行數:6,代碼來源:TreeReportWriter.java


注:本文中的com.itextpdf.text.Paragraph.setLeading方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。