PdfAdvancedPageNumberEvents() throws DocumentException, IOException { super(); bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); }
private Font getChineseFont() { if (chineseFont == null) { try { BaseFont bfChinese; try { bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); } catch (final DocumentException e) { // now CJKFont.propertiesLoaded==true, load properties renamed (cf issue 258) loadCJKFonts(); bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); } chineseFont = new Font(bfChinese, font.getSize(), font.getStyle()); } catch (final DocumentException e) { throw new IllegalStateException(e); } catch (final IOException e) { throw new IllegalStateException(e); } } return chineseFont; }
/** * Creates a new font. This will always be the default Helvetica font (not embedded). * This method is introduced because Helvetica is used in many examples. * @return a BaseFont object (Helvetica, Winansi, not embedded) * @throws IOException This shouldn't occur ever * @throws DocumentException This shouldn't occur ever * @since 2.1.1 */ public static BaseFont createFont() throws DocumentException, IOException { return createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED); }
protected BaseFont getRealFont() throws IOException, DocumentException { if (font == null) return BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, false); else return font; }
/** * Read-only accessor for <code>{@link BaseFont}</code>. Used for creating the check detail information. The font being * used is Helvetica. * * @return A BaseFont object used to identify what type of font is used on the cover sheet. */ protected BaseFont getTextFont() throws DocumentException, IOException { return BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); }
PdfAdvancedPageNumberEvents() throws DocumentException, IOException { super(); bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); }
protected BaseFont getRealFont() throws IOException, DocumentException { if (font == null) return BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, false); else return font; }
/** * Creates a new font. This will always be the default Helvetica font (not embedded). * This method is introduced because Helvetica is used in many examples. * @return a BaseFont object (Helvetica, Winansi, not embedded) * @throws IOException This shouldn't occur ever * @throws DocumentException This shouldn't occur ever * @since 2.1.1 */ public static BaseFont createFont() throws DocumentException, IOException { return createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED); }
protected BaseFont getRealFont() throws IOException, DocumentException { if (font == null) return BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, false); else return font; }
private static BaseFont createFont(String name, String encoding, boolean embedded) throws DocumentException, IOException { return BaseFont.createFont(name, encoding, embedded); }
private static BaseFont createFont(String name) throws DocumentException, IOException { return BaseFont.createFont(name, "winansi", true); }
private static BaseFont createFont(String name, String encoding, boolean embedded) throws DocumentException, IOException { return BaseFont.createFont(name, encoding, embedded); }
public static BaseFont getBaseFont() { try { return BaseFont.createFont("STSongStd-Light", "UniGB-UCS2-H", false); } catch (Exception e) { e.printStackTrace(); } return null; }
public static BaseFont getBaseFont() { try { return BaseFont.createFont("STSongStd-Light", "UniGB-UCS2-H", false); } catch (Exception e) { e.printStackTrace(); } return null; }
private static Font getFont( String fontPath, float size ) { try { BaseFont baseFont = BaseFont.createFont( fontPath, BaseFont.IDENTITY_H, BaseFont.EMBEDDED ); return new Font( baseFont, size ); } catch ( Exception ex ) { throw new RuntimeException( "Error while creating base font", ex ); } } }
public BaseFont awtToPdf(Font font) { try { BaseFontParameters p = getBaseFontParameters(font.getFontName()); if (p != null){ return BaseFont.createFont(p.fontName, p.encoding, p.embedded, p.cached, p.ttfAfm, p.pfb); }else{ return BaseFont.createFont(defaultFont, encoding, true); } } catch (Exception e) { e.printStackTrace(); } return null; }
public BaseFont awtToPdf(Font font) { try { BaseFontParameters p = getBaseFontParameters(font.getFontName()); if (p != null){ return BaseFont.createFont(p.fontName, p.encoding, p.embedded, p.cached, p.ttfAfm, p.pfb); }else{ return BaseFont.createFont(defaultFont, encoding, true); } } catch (Exception e) { e.printStackTrace(); } return null; }
static PdfFont getDefaultFont() { try { BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, false); return new PdfFont(bf, 12); } catch (Exception ee) { throw new ExceptionConverter(ee); } } void setHorizontalScaling(float hScale) {
static PdfFont getDefaultFont() { try { BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, false); return new PdfFont(bf, 12); } catch (Exception ee) { throw new ExceptionConverter(ee); } } void setHorizontalScaling(float hScale) {
static PdfFont getDefaultFont() { try { BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, false); return new PdfFont(bf, 12); } catch (Exception ee) { throw new ExceptionConverter(ee); } } void setHorizontalScaling(float hScale) {