FoxitPDFSDKforWeb v10.0.0
Foxit PDF SDK for Web
PageGraphicsObject Interface Reference

Represents a graphics object within the PDF page. More...

Inheritance diagram for PageGraphicsObject:
ImageGraphicObject PathGraphicObject ShadingGraphicObject TextGraphicObject

Public Member Functions

Promise< void > setProperties (properties:Partial< TextGraphicObjectProperties|PathGraphicObjectProperties|ImageGraphicObjectProperties|ShadingGraphicObjectProperties >)
 Set properties for the graphic object. More...
 

Public Attributes

string type
 The type of the graphic object. It can be one of the following: 'text', 'path', 'image', 'shading'. More...
 

Detailed Description

Represents a graphics object within the PDF page.

This interface allows you to manipulate and modify various types of graphic objects such as text, paths, images and shadings objects in a PDF document.

Since
9.2.0
Example of obtaining a PageGraphicsObject instance:
pdfui.getAddonInstance('PageEditor').then(pageEditorAddon => {
if (pageEditorAddon) {
const graphicObject = pageEditorAddon.getActiveGraphicsObject();
// You can now manipulate the graphic object.
} else {
console.error("Page Editor Addon instance not found.");
}
});

Member Function Documentation

◆ setProperties()

Promise<void> PageGraphicsObject::setProperties ( properties:Partial< TextGraphicObjectProperties|PathGraphicObjectProperties|ImageGraphicObjectProperties|ShadingGraphicObjectProperties )

Set properties for the graphic object.

This method allows you to update the properties of the graphic object. The specific properties that can be set depend on the type of the graphic object (text, path, image, shading).

Parameters
propertiesPartial<TextGraphicObjectProperties|PathGraphicObjectProperties|ImageGraphicObjectProperties|ShadingGraphicObjectProperties> -
Since
9.2.0

Implemented in ShadingGraphicObject, ImageGraphicObject, PathGraphicObject, and TextGraphicObject.

Member Data Documentation

◆ type

string PageGraphicsObject::type

The type of the graphic object. It can be one of the following: 'text', 'path', 'image', 'shading'.

Since
9.2.0

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.