Method TryLoad
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
TryLoad(string, bool, bool, Stream)
Attempts to load font bytes by checking the font files in the previously specified directories.
public bool TryLoad(string familyName, bool bold, bool italic, Stream stream)
Parameters
familyName
stringFamily name of the font to load.
bold
boolSet to
true
for the bold font weight.italic
boolSet to
true
for the italic font style.stream
StreamThe stream to put font bytes to.
Returns
- bool
true
if the eligible font bytes were successfully saved tostream
; otherwise,false
.
Remarks
Read the Font loading in cloud environments for an example of using this type of font loaders.
Exceptions
- ArgumentNullException
familyName
orstream
isnull
.