List of usage examples for com.lowagie.text Font TIMES_ROMAN
int TIMES_ROMAN
To view the source code for com.lowagie.text Font TIMES_ROMAN.
Click Source Link
From source file:org.activityinfo.server.report.renderer.itext.ThemeHelper.java
License:Open Source License
public static Paragraph legendTitle(String title) { Paragraph para = new Paragraph(title); para.setFont(new Font(Font.TIMES_ROMAN, BODY_FONT_SIZE, Font.BOLD, BLUE2)); para.setSpacingBefore(BODY_FONT_SIZE); return para;/*w w w . j a v a2s . c o m*/ }
From source file:org.activityinfo.server.report.renderer.itext.ThemeHelper.java
License:Open Source License
public static Font footerFont() { return new Font(Font.TIMES_ROMAN, BODY_FONT_SIZE, Font.BOLD, Color.BLACK); }
From source file:org.areasy.common.doclet.document.elements.LinkPhrase.java
License:Open Source License
/** * Creates a hyperlink chunk./*from w ww . j a v a 2s . com*/ * * @param destination The original destination as defined * in the javadoc. * @param label The text label for the link * @param font The base font for the link (for example, could be * a bold italic font in case of a "deprecated" tag). */ public LinkPhrase(String destination, String label, Font font) { super(""); Font newFont = null; float size = font.size(); if (size == 0) size = 9; if (!DefaultConfiguration.isLinksCreationActive()) destination = ""; destination = normalizeDestination(destination); if (Destinations.isValid(destination)) { if (font.family() == Font.TIMES_ROMAN) newFont = Fonts.getFont(TEXT_FONT, LINK, (int) size); else newFont = Fonts.getFont(CODE_FONT, LINK, (int) size); } else if (font.family() == Font.TIMES_ROMAN) newFont = Fonts.getFont(TEXT_FONT, (int) size); else newFont = Fonts.getFont(CODE_FONT, (int) size); init(destination, label, newFont); }
From source file:org.cocktail.superplan.server.gestionimpression.TabularEdtReport.java
License:CeCILL license
public NSData genererPdf(NSArray creneaux, NSTimestamp debutSemaine, String semaine, String libelleFormation) throws DocumentException { ByteArrayOutputStream os = new ByteArrayOutputStream(); Document document = new Document(); PdfWriter.getInstance(document, os); document.open();// w w w . j a v a 2s . c om document.setMargins(0, 0, 0, 0); Font font = new Font(Font.TIMES_ROMAN, 12, Font.BOLD, Color.DARK_GRAY); PdfPTable headerTable = new PdfPTable(1); PdfPCell cell = new PdfPCell(); Phrase ph = new Phrase(); ph.add(new Chunk(libelleFormation, font)); cell.setPhrase(ph); cell.setHorizontalAlignment(Element.ALIGN_CENTER); headerTable.addCell(cell); font = new Font(Font.TIMES_ROMAN, 10, Font.NORMAL, Color.DARK_GRAY); cell = new PdfPCell(); ph = new Phrase(); ph.add(new Chunk(semaine, font)); cell.setPhrase(ph); cell.setHorizontalAlignment(Element.ALIGN_CENTER); headerTable.addCell(cell); headerTable.setWidthPercentage(100); headerTable.setSpacingAfter(5.0f); document.add(headerTable); PdfPTable pdfTable = creerCreneauxTable(creneaux, debutSemaine); pdfTable.setWidthPercentage(100); document.add(pdfTable); document.close(); return new NSData(os.toByteArray()); }
From source file:org.egov.works.web.actions.contractorBill.ContractorBillPDFGenerator.java
License:Open Source License
protected void createCertificate() throws DocumentException { final Paragraph headerTextPara = new Paragraph(new Chunk(pdfLabel.get("contractorbill.pdf.contractorbill"), new Font(Font.TIMES_ROMAN, Font.DEFAULTSIZE, Font.BOLD))); headerTextPara.setAlignment(Element.ALIGN_CENTER); document.add(headerTextPara);/*from w w w . ja v a 2 s . c om*/ final Paragraph certificateheaderTextPara = new Paragraph(new Chunk( pdfLabel.get("contractorbill.pdf.certificate"), new Font(Font.COURIER, LARGE_FONT, Font.BOLD))); certificateheaderTextPara.setAlignment(Element.ALIGN_CENTER); document.add(certificateheaderTextPara); document.add(spacer()); document.add(spacer()); document.add(makePara(pdfLabel.get("contractorbill.pdf.certificatecontent1"))); document.add(spacer()); document.add(spacer()); document.add(rightPara( pdfLabel.get("contractorbill.pdf.juniorengineer") + "\t \t\t \t \t \t\t \t\t \t \t \t \t")); document.add(spacer()); document.add(rightPara(pdfLabel.get(dateLabel) + "\t \t \t \t\t \t\t \t \t \t \t\t \t\t \t \t \t \t\t \t\t" + "\t \t\t \t\t \t \t \t \t\t \t\t\t\t \t\t \t\t")); document.add(spacer()); document.add(makePara(pdfLabel.get("contractorbill.pdf.certificatecontent2"))); document.add(spacer()); document.add(spacer()); document.add(rightPara(pdfLabel.get("contractorbill.pdf.exeasstengineer") + "\t \t")); document.add(spacer()); document.add(rightPara(pdfLabel.get(dateLabel) + "\t \t \t \t\t \t\t \t \t \t \t\t \t\t \t \t \t \t\t \t\t" + "\t \t \t \t\t \t\t \t \t \t \t\t \t\t \t \t \t \t\t \t\t\t \t \t\t\t \t\t \t \t \t \t\t \t\t \t \t \t \t\t \t\t \t \t \t \t\t \t\t")); document.add(spacer()); document.add(makePara(pdfLabel.get("contractorbill.pdf.certificatecontent3"))); document.add(spacer()); document.add(makePara(pdfLabel.get("contractorbill.pdf.certificatecontent4"))); document.add(spacer()); document.add(makePara(pdfLabel.get("contractorbill.pdf.certificatecontent5"))); document.add(spacer()); document.add(spacer()); document.add(makePara(pdfLabel.get("contractorbill.pdf.certificatecontent6"))); document.add(spacer()); document.add(spacer()); document.add(makePara(pdfLabel.get("contractorbill.pdf.juniorengineer") + "\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t " + tab2 + tab2 + "\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t\t \t \t \t \t \t \t \t \t \t \t" + pdfLabel.get("contractorbill.pdf.exeasstengineer"))); document.add(spacer()); document.add(makePara(pdfLabel.get(dateLabel) + "\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t" + tab2 + tab2 + "\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t" + "\t \t \t \t \t \t \t \t " + pdfLabel.get(dateLabel))); }
From source file:org.inbio.modeling.core.manager.impl.ExportManagerImpl.java
License:Open Source License
private void addDocumentFooter(Document d, String[] texts) throws DocumentException { Font smallFont = new Font(Font.TIMES_ROMAN, 12, Font.BOLD); Font smallGreenFont = new Font(Font.TIMES_ROMAN, 12, Font.BOLD, Color.GREEN); Font smallDarkGreenFont = new Font(Font.TIMES_ROMAN, 12, Font.BOLD, new Color(135, 194, 53)); Paragraph footer = new Paragraph(); this.addLineSeparator(footer, 1); footer.setAlignment(Paragraph.ALIGN_CENTER); this.addEmptyLine(footer, 1); footer.add(new Paragraph(texts[0], smallFont)); footer.add(new Paragraph(texts[1], smallGreenFont)); footer.add(new Paragraph(texts[2], smallDarkGreenFont)); this.addEmptyLine(footer, 1); d.add(footer);//from w w w . j av a2s .c om }
From source file:org.inbio.modeling.core.manager.impl.ExportManagerImpl.java
License:Open Source License
private void addTableRow(Table t, String title, String value) throws BadElementException { // Fonts Definition Font boldFont = new Font(Font.TIMES_ROMAN, 12, Font.BOLD); Cell cell = new Cell(new Chunk(title, boldFont)); cell.setHeader(true);/*from w ww.ja v a 2 s . c om*/ t.addCell(cell); t.addCell(value); }
From source file:org.inbio.modeling.core.manager.impl.ExportManagerImpl.java
License:Open Source License
private void addTitleOne(Document d, String text) throws DocumentException { Font titleFont = new Font(Font.TIMES_ROMAN, 24, Font.BOLD); Paragraph p = new Paragraph(); this.addEmptyLine(p, 1); p.add(new Paragraph(text, titleFont)); this.addEmptyLine(p, 1); d.add(p);/*from w w w. jav a2s . c o m*/ }
From source file:org.inbio.modeling.core.manager.impl.ExportManagerImpl.java
License:Open Source License
private void addTitleTwo(Document d, String text) throws DocumentException { Font subtitleFont = new Font(Font.TIMES_ROMAN, 16, Font.BOLD); Paragraph p = new Paragraph(); this.addEmptyLine(p, 1); p.add(new Paragraph(text, subtitleFont)); this.addEmptyLine(p, 1); d.add(p);/* w ww .ja v a 2s .c o m*/ }
From source file:org.inbio.modeling.core.manager.impl.ExportManagerImpl.java
License:Open Source License
private void addTitleTwo(Document d, String text, boolean underline) throws DocumentException { Font subtitleFont = new Font(Font.TIMES_ROMAN, 16, Font.BOLD); Paragraph p = new Paragraph(); this.addEmptyLine(p, 1); p.add(new Paragraph(text, subtitleFont)); if (underline) this.addLineSeparator(p, 1); this.addEmptyLine(p, 1); d.add(p);/*from w ww . ja v a 2 s. co m*/ }