ResourceBuilder

ResourceBuilder

Overview

ResourceBuilder is a class in Aspose.Pdf FOSS for Java.

Builds the /Resources dictionary for a PDF page during layout.

Methods

SignatureDescription
ResourceBuilder()Creates an empty ResourceBuilder.
addEmbeddedFont(font: org.aspose.pdf.text.Font)StringRegisters a TrueType font as a {@code /Type0}/{@code /Identity-H}
embedded font and returns its resource name.
getType0Reader(resourceName: String)org.aspose.pdf.engine.font.ttf.TrueTypeReaderReturns the {@link org.aspose.pdf.engine.font.ttf.TrueTypeReader}
paired with an embedded font resource, or {@code null} if the
resource is a standard Type1 font (or not registered).
addFont(baseFont: String)String
addImage(key: String, imageStream: COSStream)StringRegisters an image XObject and returns its resource name.
buildResourcesDictionary()COSDictionaryBuilds and returns the complete /Resources COS dictionary.
getFontResourceName(baseFont: String)StringReturns the resource name for a previously registered font, or null.

See Also