This class provides helpful methods for creating fonts ready to be used in a
iText.Kernel.Pdf.PdfDocument
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.
◆
CreateFont()
[1/14]
Creates a new instance of default font, namely
iText.IO.Font.Constants.StandardFonts.HELVETICA
standard font with
iText.IO.Font.PdfEncodings.WINANSI
encoding.
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()
.
Returns
created font
Created a
PdfFont
instance given the given underlying
iText.IO.Font.FontProgram
instance.
Parameters
Created a
PdfFont
instance given the given underlying
iText.IO.Font.FontProgram
instance.
Parameters
Created a
PdfFont
instance given the given underlying
iText.IO.Font.FontProgram
instance.
Parameters
Creates a
PdfFont
by already existing font dictionary.
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.PdfCanvas
. While 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.
Parameters
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's.
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's. Required font program is expected to be previously registered by one of the register method from
PdfFontFactory
.
Parameters
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's.
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's. Required font program is expected to be previously registered by one of the register method from
PdfFontFactory
.
Parameters
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's.
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's. Required font program is expected to be previously registered by one of the register method from
PdfFontFactory
.
Parameters
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's.
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's. Required font program is expected to be previously registered by one of the register method from
PdfFontFactory
.
Parameters
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
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's.
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's. Required font program is expected to be previously registered by one of the register method from
PdfFontFactory
.
Parameters
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
.
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's.
Creates
PdfFont
based on registered
iText.IO.Font.FontProgram
's. Required font program is expected to be previously registered by one of the register method from
PdfFontFactory
.
Parameters
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
Creates a
PdfFont
instance from the TrueType Collection represented by its byte contents.
Parameters
Creates a
PdfFont
instance from the TrueType Collection given by the path to the .ttc file.
Parameters
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.
Parameters
Register fonts in some probable directories.
Register fonts in some probable directories. It usually works in Windows, Linux and Solaris.
Returns
the number of fonts registered