font=FontFactory.getFont(fontName); font.setSize(fontSize); int fontStyle=Font.NORMAL; if(fontBold && fontItalic && underLine){
private static void changeFontSize(Phrase p, float size) { for (int k = 0; k < p.size(); ++k) ((Chunk)p.get(k)).getFont().setSize(size); }
private static void changeFontSize(Phrase p, float size) { for (int k = 0; k < p.size(); ++k) ((Chunk)p.get(k)).getFont().setSize(size); }
font=FontFactory.getFont(fontName); font.setSize(fontSize); int fontStyle=Font.NORMAL; if(fontBold && fontItalic && underLine){
maxFontSize = Math.abs(rect.getHeight()) / minLines - 0.001f; font.setSize(maxFontSize); Phrase ph = new Phrase(text, font); ct = new ColumnText(null); size = (min + max) / 2; ct = new ColumnText(null); font.setSize(size); ct.setSimpleColumn(new Phrase(text, font), rect.getLeft(), rect.getBottom(), rect.getRight(), rect.getTop(), size, Element.ALIGN_LEFT); ct.setRunDirection(runDirection);
maxFontSize = Math.abs(rect.getHeight()) / minLines - 0.001f; font.setSize(maxFontSize); Phrase ph = new Phrase(text, font); ct = new ColumnText(null); size = (min + max) / 2; ct = new ColumnText(null); font.setSize(size); ct.setSimpleColumn(new Phrase(text, font), rect.getLeft(), rect.getBottom(), rect.getRight(), rect.getTop(), size, Element.ALIGN_LEFT); ct.setRunDirection(runDirection);
Font myfont = new Font(mTextToPDFOptions.getFontFamily()); myfont.setStyle(Font.NORMAL); myfont.setSize(mTextToPDFOptions.getFontSize());
private static void createPDF(String path) throws Exception { Document pdfDoc = new Document(PageSize.A4); PdfWriter.getInstance(pdfDoc, new FileOutputStream(path)).setPdfVersion(PdfWriter.VERSION_1_7); pdfDoc.open(); Font myfont = new Font(); myfont.setStyle(Font.NORMAL); myfont.setSize(11); Paragraph para = new Paragraph("test", myfont); para.setAlignment(Element.ALIGN_JUSTIFIED); pdfDoc.add(para); pdfDoc.close(); }