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
| Signature | Description |
|---|---|
ResourceBuilder() | Creates an empty ResourceBuilder. |
addEmbeddedFont(font: org.aspose.pdf.text.Font) → String | Registers 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.TrueTypeReader | Returns 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) → String | Registers an image XObject and returns its resource name. |
buildResourcesDictionary() → PdfDictionary | Builds and returns the complete /Resources PDF dictionary. |
getFontResourceName(baseFont: String) → String | Returns the resource name for a previously registered font, or null. |