|
iText 7 7.1.8 API
|
This class provides helpful methods for creating fonts ready to be used in a iText.Kernel.Pdf.PdfDocument More...
Static Public Member Functions |
|||
| static PdfFont | CreateFont () | ||
| Creates a new instance of default font, namely iText.IO.Font.Constants.StandardFonts.HELVETICA standard font with iText.IO.Font.PdfEncodings.WINANSI encoding. Note, if you want to reuse the same instance of default font, you may use iText.Kernel.Pdf.PdfDocument.GetDefaultFont() More... |
|||
| static PdfFont | CreateFont (PdfDictionary fontDictionary) | ||
| Creates a PdfFont by already existing font dictionary. More... |
|||
| static PdfFont | CreateFont (String fontProgram, String encoding, PdfDocument cacheTo) | ||
|
|||
| static PdfFont | CreateFont (String fontProgram) | ||
| Creates a PdfFont instance by the path of the font program file More... |
|||
| static PdfFont | CreateFont (String fontProgram, String encoding) | ||
| Creates a PdfFont instance by the path of the font program file and given encoding. More... |
|||
| static PdfFont | CreateTtcFont (byte[] ttc, int ttcIndex, String encoding, bool embedded, bool cached) | ||
| Creates a PdfFont instance from the TrueType Collection represented by its byte contents. More... |
|||
| static PdfFont | CreateTtcFont (String ttc, int ttcIndex, String encoding, bool embedded, bool cached) | ||
| Creates a PdfFont instance from the TrueType Collection given by the path to the .ttc file. More... |
|||
| static PdfFont | CreateFont (String fontProgram, bool embedded) | ||
| Created a PdfFont instance given the path to the font file. More... |
|||
| static PdfFont | CreateFont (String fontProgram, String encoding, bool embedded) | ||
| Created a PdfFont instance given the path to the font file. More... |
|||
| static PdfFont | CreateFont (String fontProgram, String encoding, bool embedded, bool cached) | ||
| Created a PdfFont instance given the path to the font file. More... |
|||
| static PdfFont | CreateFont (FontProgram fontProgram, String encoding, bool embedded) | ||
| Created a PdfFont instance given the given underlying iText.IO.Font.FontProgram instance. More... |
|||
| static PdfFont | CreateFont (FontProgram fontProgram, String encoding) | ||
| Created a PdfFont instance given the given underlying iText.IO.Font.FontProgram instance. More... |
|||
| static PdfFont | CreateFont (FontProgram fontProgram) | ||
| Created a PdfFont instance given the given underlying iText.IO.Font.FontProgram instance. More... |
|||
| static PdfFont | CreateFont (byte[] fontProgram, String encoding) | ||
| Created a PdfFont instance by the bytes of the underlying font program. More... |
|||
| static PdfFont | CreateFont (byte[] fontProgram, bool embedded) | ||
| Created a PdfFont instance by the bytes of the underlying font program. More... |
|||
| static PdfFont | CreateFont (byte[] fontProgram, String encoding, bool embedded) | ||
| Created a PdfFont instance by the bytes of the underlying font program. More... |
|||
| static PdfFont | CreateFont (byte[] fontProgram, String encoding, bool embedded, bool cached) | ||
| Created a PdfFont instance by the bytes of the underlying font program. More... |
|||
| static PdfType3Font | CreateType3Font (PdfDocument document, bool colorized) | ||
| Creates a new instance of PdfType3Font More... |
|||
| static PdfType3Font | CreateType3Font (PdfDocument document, String fontName, String fontFamily, bool colorized) | ||
| Creates a new instance of PdfType3Font More... |
|||
| static PdfFont | CreateRegisteredFont (String fontName, String encoding, bool embedded, int style, bool cached) | ||
| Creates PdfFont based on registered iText.IO.Font.FontProgram 's. More... |
|||
| static PdfFont | CreateRegisteredFont (String fontName, String encoding, bool embedded, bool cached) | ||
| Creates PdfFont based on registered iText.IO.Font.FontProgram 's. More... |
|||
| static PdfFont | CreateRegisteredFont (String fontName, String encoding, bool embedded) | ||
| Creates PdfFont based on registered iText.IO.Font.FontProgram 's. More... |
|||
| static PdfFont | CreateRegisteredFont (String fontName, String encoding, bool embedded, int style) | ||
| Creates PdfFont based on registered iText.IO.Font.FontProgram 's. More... |
|||
| static PdfFont | CreateRegisteredFont (String fontName, String encoding) | ||
| Creates PdfFont based on registered iText.IO.Font.FontProgram 's. More... |
|||
| static PdfFont | CreateRegisteredFont (String fontName) | ||
| Creates PdfFont based on registered iText.IO.Font.FontProgram 's. More... |
|||
| static void | RegisterFamily (String familyName, String fullName, String path) | ||
| Register a font by giving explicitly the font family and name. More... |
|||
| static void | Register (String path) | ||
| Registers a .ttf, .otf, .afm, .pfm, or a .ttc font file. More... |
|||
| static void | Register (String path, String alias) | ||
| Register a font file and use an alias for the font contained in it. More... |
|||
| static int | RegisterDirectory (String dirPath) | ||
| Registers all the fonts in a directory. More... |
|||
| static int | RegisterSystemDirectories () | ||
| Register fonts in some probable directories. More... |
|||
| static ICollection< String > | GetRegisteredFonts () | ||
| Gets a set of registered font names. More... |
|||
| static ICollection< String > | GetRegisteredFamilies () | ||
| Gets a set of registered font families. More... |
|||
| static bool | IsRegistered (String fontName) | ||
| Checks if a certain font is registered. More... |
|||
This class provides helpful methods for creating fonts ready to be used in a iText.Kernel.Pdf.PdfDocument
Note, just created PdfFont is almost empty until it will be flushed, because it is impossible to fulfill font data until flush.
|
inlinestatic |
Creates a new instance of default font, namely iText.IO.Font.Constants.StandardFonts.HELVETICA standard font with iText.IO.Font.PdfEncodings.WINANSI encoding. Note, if you want to reuse the same instance of default font, you may use iText.Kernel.Pdf.PdfDocument.GetDefaultFont()
| System.IO.IOException | if error occurred while creating the font, e.g. metrics loading failure |
|
inlinestatic |
Created a PdfFont instance by the bytes of the underlying font program.
| fontProgram | the bytes of the underlying font program |
| embedded | indicates whether the font is to be embedded into the target document |
| System.IO.IOException | signals that an I/O exception has occurred. |
|
inlinestatic |
Created a PdfFont instance by the bytes of the underlying font program.
| fontProgram | the bytes of the underlying font program |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
| System.IO.IOException | signals that an I/O exception has occurred. |
|
inlinestatic |
Created a PdfFont instance by the bytes of the underlying font program.
| fontProgram | the bytes of the underlying font program |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
| embedded | indicates whether the font is to be embedded into the target document |
| System.IO.IOException | signals that an I/O exception has occurred. |
|
inlinestatic |
Created a PdfFont instance by the bytes of the underlying font program.
| fontProgram | the bytes of the underlying font program |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
| embedded | indicates whether the font is to be embedded into the target document |
| cached | indicates whether the font will be cached |
| System.IO.IOException | signals that an I/O exception has occurred. |
|
inlinestatic |
Created a PdfFont instance given the given underlying iText.IO.Font.FontProgram instance.
| fontProgram | the font program of the PdfFont instance to be created |
|
inlinestatic |
Created a PdfFont instance given the given underlying iText.IO.Font.FontProgram instance.
| fontProgram | the font program of the PdfFont instance to be created |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
|
inlinestatic |
Created a PdfFont instance given the given underlying iText.IO.Font.FontProgram instance.
| fontProgram | the font program of the PdfFont instance to be created |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
| embedded | indicates whether the font is to be embedded into the target document |
|
inlinestatic |
Creates a PdfFont by already existing font dictionary.
Note, the font won't be added to any document, until you add it to iText.Kernel.Pdf.Canvas.PdfCanvasWhile adding to iText.Kernel.Pdf.Canvas.PdfCanvas , or to iText.Kernel.Pdf.PdfResources the font will be made indirect implicitly.
iText.Kernel.Pdf.PdfDocument.GetFont(iText.Kernel.Pdf.PdfDictionary) method is strongly recommended if you want to get PdfFont by both existing font dictionary, or just created and hasn't flushed yet.
| fontDictionary | the font dictionary to create the font from |
|
inlinestatic |
|
inlinestatic |
Created a PdfFont instance given the path to the font file.
| fontProgram | the font program file |
| embedded | indicates whether the font is to be embedded into the target document |
| System.IO.IOException | in case the file is not found or the contents of the font file is mal-formed |
|
inlinestatic |
Creates a PdfFont instance by the path of the font program file and given encoding.
| fontProgram | the path of the font program file |
| encoding | the font encoding. See iText.IO.Font.PdfEncodings |
| System.IO.IOException | exception is thrown in case an I/O error occurs when reading the file |
|
inlinestatic |
Created a PdfFont instance given the path to the font file.
| fontProgram | the font program file |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
| embedded | indicates whether the font is to be embedded into the target document |
| System.IO.IOException | in case the file is not found or the contents of the font file is mal-formed |
|
inlinestatic |
Created a PdfFont instance given the path to the font file.
| fontProgram | the font program file |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
| embedded | indicates whether the font is to be embedded into the target document |
| cached | indicates whether the font will be cached |
| System.IO.IOException | in case the file is not found or the contents of the font file is mal-formed |
|
inlinestatic |
Creates PdfFont based on registered iText.IO.Font.FontProgram 's.
| fontName | Path to font file or Standard font name |
| System.IO.IOException | exception is thrown in case an I/O error occurs when reading the file |
|
inlinestatic |
Creates PdfFont based on registered iText.IO.Font.FontProgram 's.
| fontName | Path to font file or Standard font name |
| encoding | Font encoding from iText.IO.Font.PdfEncodings |
| System.IO.IOException | exception is thrown in case an I/O error occurs when reading the file |
|
inlinestatic |
Creates PdfFont based on registered iText.IO.Font.FontProgram 's.
| fontName | Path to font file or Standard font name |
| encoding | Font encoding from iText.IO.Font.PdfEncodings |
| embedded | if true font will be embedded. Note, standard font won't be embedded in any case. |
| System.IO.IOException | exception is thrown in case an I/O error occurs when reading the file |
|
inlinestatic |
Creates PdfFont based on registered iText.IO.Font.FontProgram 's.
| fontName | Path to font file or Standard font name |
| encoding | Font encoding from iText.IO.Font.PdfEncodings |
| embedded | if true font will be embedded. Note, standard font won't be embedded in any case. |
| cached | If true font will be cached for another PdfDocument |
| System.IO.IOException | exception is thrown in case an I/O error occurs when reading the file |
|
inlinestatic |
Creates PdfFont based on registered iText.IO.Font.FontProgram 's.
| fontName | Path to font file or Standard font name |
| encoding | Font encoding from iText.IO.Font.PdfEncodings |
| embedded | if true font will be embedded. Note, standard font won't be embedded in any case. |
| style | Font style from iText.IO.Font.Constants.FontStyles |
| System.IO.IOException | exception is thrown in case an I/O error occurs when reading the file |
|
inlinestatic |
Creates PdfFont based on registered iText.IO.Font.FontProgram 's.
| fontName | Path to font file or Standard font name |
| encoding | Font encoding from iText.IO.Font.PdfEncodings |
| embedded | if true font will be embedded. Note, standard font won't be embedded in any case. |
| style | Font style from iText.IO.Font.Constants.FontStyles |
| cached | If true font will be cached for another PdfDocument |
| System.IO.IOException | exception is thrown in case an I/O error occurs when reading the file |
|
inlinestatic |
Creates a PdfFont instance from the TrueType Collection represented by its byte contents.
| ttc | the byte contents of the TrueType Collection |
| ttcIndex | the index of the font in the collection, zero-based |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
| embedded | indicates whether the font is to be embedded into the target document |
| cached | indicates whether the font will be cached |
| System.IO.IOException | in case the contents of the TrueType Collection is mal-formed or an error occurred during reading the font |
|
inlinestatic |
Creates a PdfFont instance from the TrueType Collection given by the path to the .ttc file.
| ttc | the path of the .ttc file |
| ttcIndex | the index of the font in the collection, zero-based |
| encoding | the encoding of the font to be created. See iText.IO.Font.PdfEncodings |
| embedded | indicates whether the font is to be embedded into the target document |
| cached | indicates whether the font will be cached |
| System.IO.IOException | in case the file is not found, contents of the TrueType Collection is mal-formed or an error occurred during reading the font |
|
inlinestatic |
Creates a new instance of PdfType3Font
| document | the target document of the new font |
| colorized | indicates whether the font will be colorized |
|
inlinestatic |
Creates a new instance of PdfType3Font
| document | the target document of the new font. |
| fontName | the PostScript name of the font, shall not be null or empty. |
| fontFamily | a preferred font family name. |
| colorized | indicates whether the font will be colorized |
|
inlinestatic |
Gets a set of registered font families.
|
inlinestatic |
Gets a set of registered font names.
|
inlinestatic |
Checks if a certain font is registered.
| fontName | the name of the font that has to be checked. |
|
inlinestatic |
Registers a .ttf, .otf, .afm, .pfm, or a .ttc font file.
Registers a .ttf, .otf, .afm, .pfm, or a .ttc font file. In case if TrueType Collection (.ttc), an additional parameter may be specified defining the index of the font to be registered, e.g. "path/to/font/collection.ttc,0". The index is zero-based.
| path | the path to a font file |
|
inlinestatic |
Register a font file and use an alias for the font contained in it.
| path | the path to a font file |
| alias | the alias you want to use for the font |
|
inlinestatic |
Registers all the fonts in a directory.
| dirPath | the directory path to be registered as a font directory path |
|
inlinestatic |
Register a font by giving explicitly the font family and name.
| familyName | the font family |
| fullName | the font name |
| path | the font path |
|
inlinestatic |
Register fonts in some probable directories.
Register fonts in some probable directories. It usually works in Windows, Linux and Solaris.