public void addFont(String path, String encoding, boolean embedded) throws DocumentException, IOException { addFont(path, encoding, embedded, null); }
public void addFont(String path, String encoding, boolean embedded) throws DocumentException, IOException { addFont(path, encoding, embedded, null); }
public void addFont(String path, String encoding, boolean embedded, String pathToPFB) throws DocumentException, IOException { addFont(path, null, encoding, embedded, pathToPFB); }
public void addFont(String path, boolean embedded) throws DocumentException, IOException { addFont(path, BaseFont.CP1252, embedded); }
public void addFont(String path, String encoding, boolean embedded, String pathToPFB) throws DocumentException, IOException { addFont(path, null, encoding, embedded, pathToPFB); }
public void addFont(String path, boolean embedded) throws DocumentException, IOException { addFont(path, BaseFont.CP1252, embedded); }
public void addFont(String path, String encoding, boolean embedded) throws DocumentException, IOException { addFont(path, encoding, embedded, null); }
public void addFont(String path, String encoding, boolean embedded, String pathToPFB) throws DocumentException, IOException { addFont(path, null, encoding, embedded, pathToPFB); }
public void addFont(String path, boolean embedded) throws DocumentException, IOException { addFont(path, BaseFont.CP1252, embedded); }
public void addFont(String path, String encoding, boolean embedded, String pathToPFB) throws DocumentException, IOException { addFont(path, null, encoding, embedded, pathToPFB); }
public void addFont(String path, boolean embedded) throws DocumentException, IOException { addFont(path, BaseFont.CP1252, embedded); }
public void addFont(String path, String encoding, boolean embedded) throws DocumentException, IOException { addFont(path, encoding, embedded, null); }
public void addFont(String path, boolean embedded) throws DocumentException, IOException { addFont(path, BaseFont.CP1252, embedded); }
public void addFont(String path, String encoding, boolean embedded) throws DocumentException, IOException { addFont(path, encoding, embedded, null); }
private static void configureFonts(ITextFontResolver fontResolver, String fontPath) { try { fontResolver.addFont(fontPath, INSTALLED_FONT_FAMILY, BaseFont.IDENTITY_H, true, null); } catch (DocumentException | IOException e) { throw new RuntimeException(e); } }
public void addFontDirectory(String dir, boolean embedded) throws DocumentException, IOException { File f = new File(dir); if (f.isDirectory()) { File[] files = f.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { String lower = name.toLowerCase(); return lower.endsWith(".otf") || lower.endsWith(".ttf"); } }); for (int i = 0; i < files.length; i++) { addFont(files[i].getAbsolutePath(), embedded); } } }
public void addFontDirectory(String dir, boolean embedded) throws DocumentException, IOException { File f = new File(dir); if (f.isDirectory()) { File[] files = f.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { String lower = name.toLowerCase(); return lower.endsWith(".otf") || lower.endsWith(".ttf"); } }); for (int i = 0; i < files.length; i++) { addFont(files[i].getAbsolutePath(), embedded); } } }
public void addFontDirectory(String dir, boolean embedded) throws DocumentException, IOException { File f = new File(dir); if (f.isDirectory()) { File[] files = f.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { String lower = name.toLowerCase(); return lower.endsWith(".otf") || lower.endsWith(".ttf"); } }); for (int i = 0; i < files.length; i++) { addFont(files[i].getAbsolutePath(), embedded); } } }
@Override public void addFont(File file) throws IOException { try { renderer.getFontResolver().addFont(file.getAbsolutePath(), BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); } catch (DocumentException e) { throw new IOException(e); } }
protected void useCustomFontIfConfigured(ITextFontResolver fontResolver) throws ImportExportException { FileSystemResource fontResource = pdfExportFontManager.getInstalledFont(); if (fontResource == null) return; try { fontResolver.addFont(fontResource.getPath(), INSTALLED_FONT_FAMILY, BaseFont.IDENTITY_H, true, null); } catch (DocumentException | IOException ex) { throw new ImportExportException(ex); } }