List of usage examples for com.itextpdf.text.pdf HyphenationAuto HyphenationAuto
public HyphenationAuto(String lang, String country, int leftMin, int rightMin)
Chunk. From source file:de.jost_net.JVerein.io.Reporter.java
License:Open Source License
public Reporter(OutputStream out, float linkerRand, float rechterRand, float obererRand, float untererRand) throws DocumentException { this.out = out; rpt = new Document(); rpt.setMargins(linkerRand, rechterRand, obererRand, untererRand); hyph = new HyphenationAuto("de", "DE", 2, 2); PdfWriter.getInstance(rpt, out);/*from w w w. ja va2s .c o m*/ AbstractPlugin plugin = Application.getPluginLoader().getPlugin(JVereinPlugin.class); rpt.addAuthor(plugin.getManifest().getName() + " - Version " + plugin.getManifest().getVersion()); rpt.open(); headers = new ArrayList<PdfPCell>(); widths = new ArrayList<Integer>(); }
From source file:de.jost_net.JVerein.io.Reporter.java
License:Open Source License
public Reporter(OutputStream out, String title, String subtitle, int maxRecords, float linkerRand, float rechterRand, float obererRand, float untererRand) throws DocumentException { this.out = out; rpt = new Document(); hyph = new HyphenationAuto("de", "DE", 2, 2); PdfWriter writer = PdfWriter.getInstance(rpt, out); rpt.setMargins(linkerRand, rechterRand, obererRand, untererRand); AbstractPlugin plugin = Application.getPluginLoader().getPlugin(JVereinPlugin.class); rpt.addAuthor(plugin.getManifest().getName() + " - Version " + plugin.getManifest().getVersion()); rpt.addTitle(subtitle);//from w w w.ja v a 2 s. c o m String fuss = title + " | " + subtitle + " | " + "erstellt am " + new JVDateFormatTTMMJJJJ().format(new Date()) + " " + "Seite: "; HeaderFooter hf = new HeaderFooter(); hf.setFooter(fuss); writer.setPageEvent(hf); rpt.open(); if (title.length() > 0) { Paragraph pTitle = new Paragraph(title, getFreeSansBold(13)); pTitle.setAlignment(Element.ALIGN_CENTER); rpt.add(pTitle); Paragraph psubTitle = new Paragraph(subtitle, getFreeSansBold(10)); psubTitle.setAlignment(Element.ALIGN_CENTER); rpt.add(psubTitle); } headers = new ArrayList<PdfPCell>(); widths = new ArrayList<Integer>(); }
From source file:se.billes.pdf.renderer.request.factory.HyphenationFactory.java
License:Open Source License
private HyphenationAuto getHyphenationAuto(Locale locale) { if (locale == null) { return null; }//from ww w. j a v a 2s . c om HyphenationAuto hyphenation = new HyphenationAuto(locale.getLanguage(), locale.getCountry(), 2, 2); return hyphenation; }