Resources

Inheritance: java.lang.Object, com.aspose.pdf.Resources

public final class Resources extends Object

Class representing page resources.

Methods

MethodDescription
clearImagesCache
createRepresent create method
freeMemoryClears cached data, frees memory etc.
getExtGStatesGets all ExGStates from resources.
getFontsGets {@code Fonts} resources collection
getFontsReturns fonts collection. If resources don’t contain fonts entry it will be created in depends of CreateIfAbsent flag.
getFormsGets {@code Forms} forms collection
getImagesGets {@code Images} images collection
getResourceDictionaryInternal field
getResourcesForGets resources for
isCommonResourceTrue if this resources are common i.e. are shared for several pages (placed in pages dictionary or in every page as object reference) Manipulation with common resources must be performed very carefully for example deleting object form common resources in one page may cause errors on other pages if deleted object was used for other pages.
setResourceDictionaryFor internal usage only!

clearImagesCache

public final void clearImagesCache()

create

Represent create method

freeMemory

public final void freeMemory()

Clears cached data, frees memory etc.

getExtGStates

public final com.aspose.ms.System.Collections.Generic.Dictionary< String , Resources.ExtGStateValue > getExtGStates()

Gets all ExGStates from resources.

Returns: Returns dictionary with ExGStates names keys.

getFonts

public FontCollection getFonts()

Gets {@code Fonts} resources collection

Returns: FontCollection object

getFonts

public FontCollection getFonts(boolean createIfAbsent)

Returns fonts collection. If resources don’t contain fonts entry it will be created in depends of CreateIfAbsent flag.

Parameters:

ParameterTypeDescription
createIfAbsentIf this flag is true then fonts will be created if this entry is absent.

Returns: Fonts collection.

getForms

public XFormCollection getForms()

Gets {@code Forms} forms collection

Returns: XFormCollection object

getImages

public XImageCollection getImages()

Gets {@code Images} images collection

Returns: XImageCollection object

getResourceDictionary

public com.aspose.pdf.engine.commondata.pagecontent.IResourceDictionary getResourceDictionary()

Internal field

getResourcesFor

Gets resources for

isCommonResource

public boolean isCommonResource()

True if this resources are common i.e. are shared for several pages (placed in pages dictionary or in every page as object reference) Manipulation with common resources must be performed very carefully for example deleting object form common resources in one page may cause errors on other pages if deleted object was used for other pages.

Returns: boolean value

setResourceDictionary

For internal usage only!