Foxit PDF SDK
com.foxit.sdk.addon.pdf3d.PDF3DContext Class Reference
Inheritance diagram for com.foxit.sdk.addon.pdf3d.PDF3DContext:
com.foxit.sdk.common.Base

Public Member Functions

 PDF3DContext (PDFDoc doc) throws com.foxit.sdk.PDFException
 Constructor, with a PDF document object.
 
 PDF3DContext (PDF3DContext other)
 Constructor, with another 3d context object. More...
 
PDF3DAnnot add3DAnnot (String threeD_file_path, int page_index, RectF rectf, java.lang.Object screen_canvas_parent, PDF3DLaunchSetting launch_setting, PDF3DAdvancedSetting advanced_setting)
 Add a 3D annotation to the PDF page. More...
 
PDF3DAnnot add3DAnnot (FileReaderCallback threeD_file_read, int page_index, RectF rectf, java.lang.Object screen_canvas_parent, PDF3DLaunchSetting launch_setting, PDF3DAdvancedSetting advanced_setting)
 Add a 3D annotation to the PDF page. More...
 
synchronized void delete ()
 Clean up related C++ resources immediately. More...
 
PDF3DAnnotArray getPage3DAnnotArray (int page_index)
 Get 3d annot objects array by page index. More...
 
void invalidate ()
 Refresh 3D Objects. More...
 
boolean isEmpty ()
 Check whether current object is empty or not. More...
 
- Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void delete ()
 Clean up related C++ resources immediately. More...
 

Detailed Description

This class represents a 3D PDF context. Before using any class or methods in this module, please ensure Foxit PDF SDK has been initialized successfully by function common.Library.initialize with a key including "3D" module.
Currently, 3D module only supports Windows.

See also
com.foxit.sdk.common.Library

Constructor & Destructor Documentation

◆ PDF3DContext()

com.foxit.sdk.addon.pdf3d.PDF3DContext.PDF3DContext ( PDF3DContext  other)

Constructor, with another 3d context object.

Parameters
[in]otherAnother 3d context object.

Member Function Documentation

◆ add3DAnnot() [1/2]

PDF3DAnnot com.foxit.sdk.addon.pdf3d.PDF3DContext.add3DAnnot ( String  threeD_file_path,
int  page_index,
RectF  rectf,
java.lang.Object  screen_canvas_parent,
PDF3DLaunchSetting  launch_setting,
PDF3DAdvancedSetting  advanced_setting 
)

Add a 3D annotation to the PDF page.

Parameters
[in]threeD_file_pathThe file path of 3D file. Currently, it supports u3d and prc.
[in]page_indexThe index of the page to which the 3D annotation is added. Valid range: from 0 to (page_count-1).
[in]rectfThe rectangle of new 3d annotation in [PDF coordinate system].
[in]screen_canvas_parentThe screen canvas parent handle.
[in]launch_settingThe 3D launch setting.
[in]advanced_settingThe 3D advanced setting.
Returns
The added 3D annotation object.

◆ add3DAnnot() [2/2]

PDF3DAnnot com.foxit.sdk.addon.pdf3d.PDF3DContext.add3DAnnot ( FileReaderCallback  threeD_file_read,
int  page_index,
RectF  rectf,
java.lang.Object  screen_canvas_parent,
PDF3DLaunchSetting  launch_setting,
PDF3DAdvancedSetting  advanced_setting 
)

Add a 3D annotation to the PDF page.

Parameters
[in]threeD_file_readThe file reader callback of 3D file. Currently, it supports u3d and prc. Please refer to com.foxit.sdk.common.fxcrt.FileReaderCallback for details.
[in]page_indexThe index of the page to which the 3D annotation is added. Valid range: from 0 to (page_count-1).
[in]rectfThe rectangle of new 3d annotation in [PDF coordinate system].
[in]screen_canvas_parentThe screen canvas parent handle.
[in]launch_settingThe 3D launch setting.
[in]advanced_settingThe 3D advanced setting.
Returns
The added 3D annotation object.

◆ delete()

synchronized void com.foxit.sdk.addon.pdf3d.PDF3DContext.delete ( )

Clean up related C++ resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

◆ getPage3DAnnotArray()

PDF3DAnnotArray com.foxit.sdk.addon.pdf3d.PDF3DContext.getPage3DAnnotArray ( int  page_index)

Get 3d annot objects array by page index.

Parameters
[in]page_indexPage index. Valid range: from 0 to (page_count-1). page_count is returned by function pdf.PDFDoc.getPageCount .
Returns
3d annot objects array.

◆ invalidate()

void com.foxit.sdk.addon.pdf3d.PDF3DContext.invalidate ( )

Refresh 3D Objects.

To dynamically display 3D effects, it is necessary to modify the interface based on loop calls.

Returns
None.

◆ isEmpty()

boolean com.foxit.sdk.addon.pdf3d.PDF3DContext.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.