ResourceBuilder

ResourceBuilder

Overview

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

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

This class provides 7 methods for working with ResourceBuilder objects in Java programs. Available methods include: ResourceBuilder, addEmbeddedFont, addFont, addImage, buildResourcesDictionary, getFontResourceName, getType0Reader. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.

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: PdfStream) → StringRegisters an image XObject and returns its resource name.
buildResourcesDictionary() → PdfDictionaryBuilds and returns the complete /Resources PDF dictionary.
getFontResourceName(baseFont: String) → StringReturns the resource name for a previously registered font, or null.

See Also

 English