A3DPDFPublishSDK.h
Header file for the Publish module.
- Author
Tech Soft 3D
- Version
23.0
- Date
January 2023
- Copyright (c) 2010 - 2023 by Tech Soft 3D, Inc. All rights reserved.
Content
Data Structures
A3DPDFRgbColorData structure. |
|
A3DPDFPageData structure. |
|
A3DPDFPageData2 structure. |
|
A3DPDFRectData structure: structure to define a rectangle placement in the PDF page. |
|
A3DPDFRectDData structure: structure to define a rectangle placement in the PDF page, in double precision. |
|
A3DPDFDocumentInformationData structure. |
|
A3DPDFTextData structure. |
|
A3DPDFTextDataEx structure. |
|
A3DPDFImageData structure. |
|
A3DPDFLinkData structure Since 2017, m_pcJavascriptString can only be defined with a HOOPS Publish Advanced version. With HOOPS Publish Standard version, you should use A3DPDFLinkAddAction. |
|
Structure to define a table. |
|
Structure to define a table style. |
|
Structure to define a table cell. |
|
Structure to define a table row. |
|
Structure to define a table from API. |
|
A3DPDFFieldData structure. |
|
A3DPDF3DArtworkData structure. |
|
Structure to define settings for the cross sections display. These settings are used by HOOPS Publish at PDF creation on every native views that have a clipping plane defined. These settings are not used at runtime with clipping plane created by Javascript. |
|
A3DPDF3DArtworkData2 structure. |
|
A3DPDF3DAnnotData structure: options for the 3D Annot behavior in the PDF. |
|
A3DPDFSnapshotOptionsData structure: options for the snapshot (poster) generation. |
|
Structure to define a Camera View. |
|
Structure to define a transformation. |
|
Structure grouping the appearance characteristics. |
|
Structure grouping the camera characteristics. |
|
Structure to define a keyframe. |
|
Structure to define an animation motion. |
|
Structure to define a target entity. |
|
Structure to define an animation motion. |
|
Structure to define an animation. |
|
Structure to define a button field. |
|
Structure to define a text field. |
|
Structure to define a digital signature field. |
|
Structure that defines a graphic dash pattern. |
|
Structure that defines a graphic rectangle. |
|
Structure that defines a graphic line. |
|
Structure that defines a graphic circle arc. |
|
Structure that defines a graphic bezier curve. |
|
Structure that defines a graphic path. |
|
Structure to define an action to activate a view in a 3D annotation. |
|
Structure to define an action to start an animation on a 3D annotation. |
|
Structure to define an action to pause the animation player on a 3D annotation. |
|
Structure to define an action to resume the animation player on a 3D annotation. |
|
Structure to define an action to set the default rendering type for all objects in the scene on a 3D annotation. |
|
Structure to define an action to launch a URL in a browser window. |
|
A3DPDFRichMediaAnnotData structure: options for the RichMedia annot behavior in the PDF. |
Type definitions
Functions
Function to initialize the PDF Library and set the resource directory. |
|
Function to terminate the PDF Library. Terminates the PDF library. This function should only be called at the end of your application. Do not call this function and then continue to use either HOOPS Exchange or HOOPS Publish. Doing so will result in undefined behavior. It is important to call this function only once during the life of the application. |
|
Function to check if the PDF Library has been initialized with A3DPDFInitializePDFLibAndResourceDirectory . |
|
Gets the actual type of the PDF Widget. |
|
Function to create an empty PDF document. |
|
Function to create a document from a PDF file. |
|
This function adds a unique page to an empty PDF document. |
|
Function to get the unique page of the document. |
|
Function to get the number of pages in the document. |
|
Function to get a page in the document. |
|
Function to remove pages in the document. |
|
Appends a new empty page to a document. |
|
Appends a new empty page to a document. |
|
Function to set information on the document. These information are visible in the Adobe Reader on the File Properties menu. |
|
Function to set custom property on the document. These information are visible in the Adobe Reader on the File Properties menu, on the Custom thumbnail. |
|
Function to add user and owner passwords on a document. |
|
Function to set permissions on a document. |
|
Function to set permissions and passwords on a document. |
|
Function to attach a file to the document. |
|
Retrieves the PDF version of a given document. |
|
Function to save the PDF document. |
|
Function to save the PDF document, using some flags for optimizing the size of the resulting PDF. |
|
Function to close the document and free all memory. |
|
Function to embed a font in a PDF document. |
|
Function to check the existence of a PDF font on the local system. |
|
Function to create a text object. |
|
Function to create a text object with extended fonts and languages. |
|
Function to determine the width of a text string. |
|
Function to insert a text in a page. |
|
Function to insert a text in a table. |
|
Function to create a picture image object. |
|
Function to create an image object from a file. |
|
Function to create an image object from a file. |
|
Function to insert a static image in a page. With this, an image is positionned on a page but can not be used for interactivity. |
|
Function to insert a static image in a page. With this, an image is positionned on a page but can not be used for interactivity. |
|
Function to create a link object. |
|
Function to insert a link in a page. |
|
Function to insert a link in a table. |
|
Function to create a table on a PDF page. |
|
Function to create a cell in a table on a PDF page, from an API definition. |
|
Function to create a row in a table on a PDF page, from an API definition. |
|
Function to create a table on a PDF page, from an API definition. |
|
Function to insert a table in a page. |
|
Function to retrieve the fields of a PDF page. The fields supported are only form fields created with Acrobat. LiveCycle Designer fields (XFA) are not supported. |
|
Function to get a PDF Field from an existing form field on a page. |
|
Function to retrieve useful information regarding a field of a document. |
|
Function to retrieve the position of a widget on a page. |
|
Function to retrieve the name (identifier) of a widget. |
|
Function to set the visibility of a form field. |
|
Function to create the 3D Artwork of the 3D Annot. |
|
Function to create the 3D Artwork of the 3D Annot. |
|
Function to create a 3D Annotation object. |
|
Function to insert a 3D Annot in a page. |
|
Function to replace the form field specified with a 3D Annot object. |
|
Function to create a PRC Stream from a Model File. |
|
Function to create a U3D Stream from Model File. |
|
Function to create a Stream from a file. |
|
Function to create the poster for a view in a model file. |
|
Function to create a camera view. |
|
Adds a view on the 3D Annot. |
|
Returns the views objects stored in the artwork. |
|
Returns the identifier of the view. |
|
Get the bounding sphere of the default view of the 3D Artwork. |
|
Function to create a keyframe. |
|
Structure to define a target entity of a motion. |
|
Utility function to retrieve the targets from their names. |
|
Function to create an animation motion. |
|
Function to create an animation motion. |
|
Function to create an animation. |
|
Debug function to edit the JavaScript stream corresponding to the animation data in a file. |
|
Function to create a button. |
|
Function to insert a button in a page. |
|
Function to insert a button in a table. |
|
Function to set the label of a button form field. |
|
Function to set the label of a button form field. |
|
Function to set the icon of a button form field. |
|
Function to set the icon of a button form field. |
|
Function to create a text field. |
|
Function to insert a text field in a page. |
|
Function to insert a text field in a table. |
|
Function to set the text of a text form field. |
|
Function to set the text of a text form field. |
|
Function to create a DigitalSignature. |
|
Function to insert a DigitalSignature in a page. |
|
Function to create a graphic line. |
|
Function to create a graphic line. |
|
Function to create a graphic circle arc. |
|
Function to create a graphic bezier curve. |
|
Function to create a graphic composite path. |
|
Creates an A3DPDFActionSetView from A3DPDFActionSetViewData structure. |
|
Creates an A3DPDFActionStartAnimation from A3DPDFActionStartAnimationData structure. |
|
Creates an A3DPDFActionPauseAnimation from A3DPDFActionPauseAnimationData structure. |
|
Creates an A3DPDFActionResumeAnimation from A3DPDFActionResumeAnimationData structure. |
|
Creates an A3DPDFActionSetRenderingStyle from A3DPDFActionSetRenderingStyleData structure. |
|
Creates an A3DPDFActionLaunchURL from A3DPDFActionLaunchURLData structure. |
|
Adds an action on a button. |
|
Adds an action on a link. |
|
Export a PDF document to image, treating only one page or all pages. |
|
Function to create a RichMedia Annotation object. |
|
Function to insert a RichMedia Annot in a page. |
Type definitions
-
typedef void A3DPDFDocument
PDF document entity.
See also
-
typedef void A3DPDFPage
PDF page entity.
See also
-
typedef void A3DPDFText
PDF text entity.
See also
-
typedef void A3DPDFImage
PDF image entity.
See also
-
typedef void A3DPDFLink
PDF link entity.
See also
-
typedef void A3DPDFTable
PDF table entity.
See also
-
typedef void A3DPDFTableCellDesc
PDF table cell entity.
See also
-
typedef void A3DPDFTableRowDesc
PDF table row entity.
See also
-
typedef void A3DPDFLayer
PDF layer entity.
See also
-
typedef void A3DPDFRichMediaAnnot
PDF rich media entity.
See also
-
typedef void A3DPDFWidget
PDF Widget. Abstract type. Widgets are low level Fields, or High Level widgets (scroll table, view carousel).
See also
-
typedef void A3DPDFField
Field. Abstract type. Fields are low level objects positioned on a PDF page.
See also
-
typedef void A3DPDFButton
Button field.
See also
-
typedef void A3DPDFTextField
Text field.
See also
-
typedef void A3DPDFDigitalSignature
Digital signature field.
See also
-
typedef void A3DPDFCheckBox
Check box field.
See also
-
typedef void A3DPDFRadioButton
Radio button field.
See also
-
typedef void A3DPDFListBox
Listbox field.
See also
-
typedef void A3DPDFDropDownList
Drop down list field.
See also
-
typedef void A3DPDF3DViewCarousel
3D view carousel widget. High level object widget.
See also
-
typedef void A3DPDFScrollTable
Scroll table widget. High level object widget.
See also
-
typedef void A3DPDFDataFilter
Data Filter widget. High level object widget.
See also
-
typedef void A3DPDF3DNodeScene
Widget to interact with 3D nodes (via the 3D model tree or via the 3D annotation scene).
See also
-
typedef void A3DPDF3DViewList
Widget to interact with 3D views (via the 3D model tree or via the context menu in the 3D annotation scene).
See also
-
typedef void A3DPDF3DAnnot
3D Annotation entity.
See also
-
typedef void A3DPDF3DStream
3D Stream entity.
See also
-
typedef void A3DPDF3DArtwork
3D Artwork entity.
See also
-
typedef void A3DPDFView
3D View entity.
See also
-
typedef void A3DPDFAnimKeyFrame
Key frame entity.
See also
-
typedef void A3DPDFAnimMotion
Animation motion entity.
See also
-
typedef void A3DPDFAnimation
Animation entity.
See also
-
typedef void A3DPDFTargetEntity
Animation target entity.
See also
-
typedef void A3DPDFAction
Action. Abstract type.
-
typedef void A3DPDFActionSetView
Action of type SetView.
-
typedef void A3DPDFActionStartAnimation
Action of type StartAnimation.
-
typedef void A3DPDFActionPauseAnimation
Action of type PauseAnimation.
-
typedef void A3DPDFActionResumeAnimation
Action of type ResumeAnimation.
-
typedef void A3DPDFActionSetRenderingStyle
Action of type SetRenderingStyle.
-
typedef void A3DPDFActionLaunchURL
Action of type LaunchURL.
-
typedef void A3DPDFDataTable
Data Table.
See also
-
typedef void A3DPDFObjectDataTable
Data Table with objects.
See also
-
typedef void A3DPDFDataTable3DViews
Data Table for 3D views.
See also
Functions
-
A3DStatus A3DPDFInitializePDFLib()
- Deprecated:
This method was deprecated in HOOPS Publish 5.1. Use A3DPDFInitializePDFLibAndResourceDirectory instead.
This function initializes the Adobe PDF Library which is internally used by HOOPS Publish. It should be called before calling any function working on the PDF document, and only once during the life of the application.
- Version
4.1
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFInitializePDFLibAndResourceDirectory(const A3DUTF8Char *pcResourceDirectory)
Function to initialize the PDF Library and set the resource directory.
This function initializes the Adobe PDF Library which is internally used by HOOPS Publish, and indicates where the resource directory is located. The resource directory is used by the Adobe PDF Library to manipulate text data. Customers should consider as a general rule that a complete resource directory (subfolders included) should always exist in the distribution and should always be specified to the A3DPDFInitializePDFLibAndResourceDirectory function. Not providing a valid resource directory can lead to unexpected behavior and crashes. As an example, the Table functionality fails if the resource directory doesn’t exist or is not specified. A minimal exception to this rule might be when the PDF document generated doesn’t contain any text strings, whatever the source (added with HOOPS Publish functions or even already defined in a provided PDF template).
The resource directory is provided with the HOOPS Publish package in the \bin\resource folder. Please also consider all subfolders as part of the resources.
This function should be called before calling any function working on the PDF document, and only once during the life of the application.
- Version
5.0
- Parameters
pcResourceDirectory – [in] The path of an existing directory with full resource definition as provided in the HOOPS Publish package. The path must be absolute, or must be relative to the location of your binary files. If relative, please make it start by a ‘.’ or “..” character. Empty string (“”) is valid but should be used very cautiously as not using resources can lead to unexpected behavior and crashes (see function description).
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTerminatePDFLib()
Function to terminate the PDF Library. Terminates the PDF library. This function should only be called at the end of your application. Do not call this function and then continue to use either HOOPS Exchange or HOOPS Publish. Doing so will result in undefined behavior. It is important to call this function only once during the life of the application.
- Version
4.1
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFCheckPDFLibInitialization(A3DBool *pbIsInitialized)
Function to check if the PDF Library has been initialized with A3DPDFInitializePDFLibAndResourceDirectory.
- Version
11.0
- Parameters
pbIsInitialized – [out] true if the PDF Library has been initialized, false if not.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFWidgetGetType(const A3DPDFWidget *pWidget, A3DPDFEWidgetType *peWidgetType)
Gets the actual type of the PDF Widget.
This function returns an integer that specifies a PDF Widget type. The integer corresponds to one of the values described by the A3DPDFEWidgetType enumeration.
See also
- Version
10.0
- Parameters
pWidget – [in] The widget.
peWidgetType – [out] The widget type.
- Return values
A3D_INVALID_ENTITY_NULL –
A3D_INVALID_ENTITY_TYPE –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentCreateEmpty(A3DPDFDocument **ppDoc)
Function to create an empty PDF document.
This function creates a document with no page. Subsequently, some pages must be added with the append functions A3DPDFDocumentAppendNewPage2 or A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields.
- Version
4.1
- Parameters
ppDoc – [out] The document created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentCreateFromPDFFile(const A3DUTF8Char *pcFileName, A3DPDFDocument **ppDoc)
Function to create a document from a PDF file.
This function creates a document from a PDF input file. Starting with HOOPS Publish 6.0 the input PDF can contain several pages. Pages can be added to the document with append functions A3DPDFDocumentAppendNewPage2 or A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields.
- Version
4.1
- Parameters
pcFileName – [in] The input file name.
ppDoc – [out] The document created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentCreateUniquePage(A3DPDFDocument *pDoc, const A3DPDFPageData *pPageData, A3DPDFPage **ppPage)
- Deprecated:
This method was deprecated in HOOPS Publish 1.10. Use A3DPDFDocumentAppendNewPage2 instead.
This function adds a unique page to an empty PDF document. This function can only be used on a file opened with A3DPDFDocumentCreateEmpty. It can’t be used on a file which already contains a page.
- Version
4.1
- Parameters
pDoc – [inout] The current document on which the new page will be added.
pPageData – [in] The page data parameters.
ppPage – [out] The newly-created page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentCreateUniquePage2(A3DPDFDocument *pDoc, const A3DPDFPageData2 *pPageData, A3DPDFPage **ppPage)
This function adds a unique page to an empty PDF document.
- Deprecated:
This method is deprecated. Use A3DPDFDocumentAppendNewPage2 instead.
This function can only be used on a file opened with A3DPDFDocumentCreateEmpty. It can’t be used on a file which already contains a page.
- Version
7.2
- Parameters
pDoc – [inout] The current document on which the new page will be added.
pPageData – [in] The page data parameters.
ppPage – [out] The newly-created page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentGetUniquePage(const A3DPDFDocument *pDoc, A3DPDFPage **ppPage)
Function to get the unique page of the document.
- Deprecated:
This method was deprecated in HOOPS Publish 6.0. Use A3DPDFDocumentGetPage instead.
This function only works on a document which contains a single page. It is designed to be called after A3DPDFDocumentCreateFromPDFFile to get the Page object.
- Version
4.1
- Parameters
pDoc – [in] The Document object to work with.
ppPage – [out] The Page object.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentGetNumberPages(const A3DPDFDocument *pDoc, A3DInt32 *piNbPages)
Function to get the number of pages in the document.
- Version
6.0
- Parameters
pDoc – [in] The Document object to work with.
piNbPages – [out] The number of pages. Remember to subtract 1 from this value if you are going to pass it to a method that takes a zero-based page number.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentGetPage(const A3DPDFDocument *pDoc, const A3DInt32 iNumPage, A3DPDFPage **ppPage)
Function to get a page in the document.
- Version
6.0
- Parameters
pDoc – [in] The Document object to work with.
iNumPage – [in] The index of the page. The first page is 0.
ppPage – [out] The Page object.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentRemovePages(const A3DPDFDocument *pDoc, const A3DInt32 iFirstPage, const A3DInt32 iLastPage)
Function to remove pages in the document.
- Version
6.0
- Parameters
pDoc – [inout] The Document object to work with.
iFirstPage – [in] The index of the first page to remove. The first page is 0.
iLastPage – [in] The index of the last page to remove.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentAppendNewPage(A3DPDFDocument *pDoc, const A3DPDFPageData *pPageData, A3DPDFPage **ppPage)
Appends a new empty page to a document.
- Deprecated:
Use A3DPDFDocumentAppendNewPage2 instead.
The page is added at the end of the document. It is a new page created with the options set in the pPageData argument.
- Version
4.2
- Parameters
pDoc – [inout] The Document object to work with.
pPageData – [in] The page parameters.
ppPage – [out] The Page object for the new page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentAppendNewPage2(A3DPDFDocument *pDoc, const A3DPDFPageData2 *pPageData, A3DPDFPage **ppPage)
Appends a new empty page to a document.
The page is added at the end of the document. It is a new page created with the options set in the pPageData argument.
- Version
7.2
- Parameters
pDoc – [inout] The Document object to work with.
pPageData – [in] The page parameters.
ppPage – [out] The Page object for the new page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentAppendPageFromPDFFile(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, A3DPDFPage **ppPage)
- Deprecated:
Function deprecated, Please use A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields.
Appends new pages from a PDF template to a document. Starting with HOOPS Publish 6.0 the input PDF can contain several pages. The pages are added at the end of the document. All pages are copied from the PDF template file specified with the pcFileName argument. If the imported pages contain form fields with names that already exist on other pages of the document, the function will fail. In this situation, use A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields to rename all form fields of the imported pages.
- Version
4.2
- Parameters
pDoc – [inout] The Document object to work with.
pcFileName – [in] The input file name of the PDF template.
ppPage – [out] The Page object for the last page inserted.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentAppendPageFromPDFFileEx(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DBool bRenameFields, A3DPDFPage **ppPage)
Appends new pages from a PDF template to a document, with the possibility to rename all form fields to avoid PDF conflicts. This method supersedes A3DPDFDocumentAppendPageFromPDFFile() in A3DLIBS 4.3 and later. Starting from HOOPS Publish 6.0 the input PDF can contain several pages. The pages are added at the end of the document. All pages are copied from the PDF template file specified with the pcFileName argument. If the imported pages contain form fields with names that already exist on other pages of the document, the function will fail. In this situation, set the bRenameFields parameter to true to rename all form fields of the imported pages.
Warning: All references to the renamed form fields have to be modified to reflect the new names. This has to be done for example for JavaScript code that could work with these fields. Please refer to the section ‘Field Names’ in programming guide for a description of specific cases with field names.
- Version
4.3
- Parameters
pDoc – [inout] The Document object to work with.
pcFileName – [in] The input file name of the PDF template.
bRenameFields – [in] If true, the form fields of the template pages are renamed, appending the position of the pages in the final document to every fields. Note that the index of the first page is 1. For example, a field ‘MyTitle’ will be renamed ‘MyTitle_1’ if the page is inserted as the first page of the document. If false, the form fields are not renamed and the function will fail if some fields already exist on the document with the same name.
ppPage – [out] The Page object for the last page inserted.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DUTF8Char *pcAppendStringToFieldNames, A3DPDFPage **ppPage)
Appends new pages from a PDF template to a document, with the possibility to rename all form fields to avoid PDF conflicts. This method supersedes A3DPDFDocumentAppendPageFromPDFFile() in A3DLIBS 11.1 and later.
Starting from HOOPS Publish 6.0 the input PDF can contain several pages. The pages are added at the end of the document. All pages are copied from the PDF template file specified with the pcFileName argument.
If the imported pages contain form fields with names that already exist on other pages of the document, the function will fail. In this situation, set the pcAppendStringToFieldNames parameter to rename all form fields of the imported pages.
Warning: All references to the renamed form fields have to be modified to reflect the new names. This has to be done for example for JavaScript code that could work with these fields. Please refer to the section ‘Field Names’ in programming guide for a description of specific cases with field names.
- Version
11.1
Details
When using pcAppendStringToFieldNames to modify field names, please be aware of the following:
If the string is not empty, the field name is suffixed with it. For example, a field ‘MyTitle’ with pcAppendStringToFieldNames set to ‘abcd’ will be renamed ‘MyTitle_abcd’. Please refer to the section ‘Field Names’ in programming guide for a description of specific cases with field names.
If the field has been copied/pasted in Acrobat, then the field is renamed ‘fieldname_appendstring.index’.
If the field belongs to a group of fields, then the field is renamed ‘groupname_appendstring.fieldname’.
If the field is a radio button, then the field is renamed ‘radiobuttongroupname_appendstring.index’.
If pcAppendStringToFieldNames is NULL or empty, the form fields are not renamed and the function will fail if fields already exist in the document with the same name.
- Parameters
pDoc – [inout] The Document object to work with.
pcFileName – [in] The input file name of the PDF template.
pcAppendStringToFieldNames – [in] The string that is appended to all form fields. Please see the details section below for more information.
ppPage – [out] The Page object for the last page inserted.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentSetInformation(A3DPDFDocument *pDoc, const A3DPDFDocumentInformationData *pInformationData)
Function to set information on the document. These information are visible in the Adobe Reader on the File Properties menu.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
pInformationData – [in] The information parameters.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentSetCustomProperty(A3DPDFDocument *pDoc, const A3DUTF8Char *pcPropName, const A3DUTF8Char *pcPropValue)
Function to set custom property on the document. These information are visible in the Adobe Reader on the File Properties menu, on the Custom thumbnail.
- Version
12.2
- Parameters
pDoc – [inout] The Document object to work with.
pcPropName – [in] The property name.
pcPropValue – [in] The property value.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentSetPassword(A3DPDFDocument *pDoc, const A3DUTF8Char *pcUserPassword, const A3DUTF8Char *pcOwnerPassword)
Function to add user and owner passwords on a document.
- Deprecated:
This method is deprecated because it allows generation of a PDF file with an owner password and no permissions, which is not a good practice. Use A3DPDFDocumentSetPasswordSecurity instead.
These passwords are natively supported by Adobe Reader. If a user password is specified, Adobe Reader will ask for a password when opening the document. The owner password is the password used to set document restrictions on the document. It does not restrict the opening of a PDF file, only what can be done once opened. Document restrictions can include printing, changing the document, document assembly, content copying, content copying for accessibility, page extraction, commenting, filling of form fields, signing, and creation of template pages.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
pcUserPassword – [in] The password to protect the document at opening. Also protects against document modification and printing. If an empty string is specified, no user password is required by Adobe Reader or Acrobat.
pcOwnerPassword – [in] Lets you require a password when changing the security features of the PDF, not when opening it. If an empty string is specified, no password will be required in Acrobat to change security settings.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentSetDocumentPermissions(A3DPDFDocument *pDoc, int iPermissions)
Function to set permissions on a document.
- Deprecated:
This method is deprecated because it allows to generate a PDF file with permission and no owner password, which is not a good practice. Use A3DPDFDocumentSetPasswordSecurity instead.
- Version
7.2
- Parameters
pDoc – [inout] The Document object to work with.
iPermissions – [in] The permissions, composed of bit fields detailed in Bit Field to indicate the document permissions..
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentSetPasswordSecurity(A3DPDFDocument *pDoc, const A3DUTF8Char *pcUserPassword, const A3DUTF8Char *pcOwnerPassword, A3DUns32 iPermissions, A3DPDFEEncryptContent eEncryptContentOptions)
Function to set permissions and passwords on a document.
The passwords are natively supported by Adobe Reader. If a user password is specified, Adobe Reader will ask for a password when opening the document.
The owner password is the password used to set document restrictions on the document. It does not restrict the opening of a PDF file, only what can be done once opened. Document restrictions can include printing, changing the document, document assembly, content copying, content copying for accessibility, page extraction, commenting, filling of form fields, signing, and creation of template pages.
Please note that the owner password is respected by Adobe reader and Acrobat products, but might not be respected by other vendors. However, the user password offers more complete protection of the PDF file and can only be broken by brute-force attacks. To ensure maximum password security, it’s good practice to define passwords with a long set of characters that are not based on simple patterns of characters or common words.
The password encryption implemented is the AES 128-bit algorithm, which is compatible with Acrobat 7 and later versions.
- Version
12.0
- Parameters
pDoc – [inout] The Document object to work with.
pcUserPassword – [in] The password to protect the document at opening. If NULL or an empty string is specified, no user password is required by Adobe Reader or Acrobat.
pcOwnerPassword – [in] Lets you require a password when changing the security features of the PDF. An owner password is necessary to define permissions. If NULL or an empty string is specified, all permissions are allowed and no password will be required in Acrobat to change security settings.
iPermissions – [in] The permissions, composed of bit fields detailed in Bit Field to indicate the document permissions.. A permission can only be defined if an owner password is defined. Otherwise, all permissions are allowed. Typical values are as follows:
kA3DPDFDocumentPermDocAssembly is for inserting, deleting, and rotating page
kA3DPDFDocumentPermFillandSign is for filling in form fields and signing signature fields
kA3DPDFDocumentPermFillandSign+kA3DPDFDocumentPermEditNotes is for commenting, filling in form fields, and signing signature fields
eEncryptContentOptions – [in] Specifies the content to encrypt. See A3DPDFEEncryptContent description.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentAddFileAttachment(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DUTF8Char *pcDescription)
Function to attach a file to the document.
Attachments are visible on the Adobe Reader with the specific navigation pane. In Adobe Reader X version, the Attachments pane can be activated with the menu View / Show/Hide / Navigation Panes / Attachments.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
pcFileName – [in] The name of the file to attach.
pcDescription – [in] The description of the attached file.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentGetVersion(const A3DPDFDocument *pDoc, A3DUTF8Char **ppcVersion)
Retrieves the PDF version of a given document.
The version returned by
A3DPDFDocumentGetVersion
is a string matching the value displayed within Adobe PDF Reader properties.- Version
22.
The result string is composed of the PDF version followed to by the minimum Acrobat version that supports the format between parenthesis.
The PDF version format follows the
MAJOR.MINOR
rule with the following Acrobat/PDF compatibility matching:- PDF Version Specification
PDF version
Acrobat version
1.7 and older
Same version specifier
1.8
Acrobat 9
1.9
Acrobat 10
Starting from Acrobat 9, the Adobe Version may contain an extension level specifier based upon Adobe extensions registry. The specifier follows the version, separated by a comma.
for example:
A document created empty with HOOPS Publish would return: _”1.6 (Acrobat 7.x)”_.
A document created from a file saved in Acrobat with option ‘Acrobat 10 and later’ would return: _”1.7, Adobe Extension Level 8 (Acrobat X)”_.
When
A3DPDFDocumentGetVersion
returnsA3D_SUCCESS
,ppcVersion
can be freed by calling A3DPDFDocumentGetVersion with pDoc set to nullptr- Memory Management
- Parameters
pDoc – [inout] The Document object get the version from.
ppcVersion – [out] A pointer.
- Return values
A3D_SUCCESS – in case of success.
A3D_NOT_AVAILABLE – if Publish is not available in the package.
A3D_INVALID_ENTITY_NULL – if any of
pDoc
orppcVersion
is 0.
- Returns
A3D_SUCCESS
or an error code in case of failure.
-
A3DStatus A3DPDFDocumentSave(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName)
Function to save the PDF document.
- Deprecated:
This function is now deprecated. Use A3DPDFDocumentSaveEx with flags kA3DPDFSaveFull to have the same basic behaviour.
- Version
4.1
- Parameters
pDoc – [in] The Document object to save.
pcFileName – [in] The file name where to save the document. The path (absolute or relative) must be provided (use “.\” or “./” for the current directory).
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentSaveEx(A3DPDFDocument *pDoc, const int iSaveFlags, const A3DUTF8Char *pcFileName)
Function to save the PDF document, using some flags for optimizing the size of the resulting PDF.
- Version
9.2
- Parameters
pDoc – [in] The Document object to save, using some flags for optimizing the resulting PDF.
iSaveFlags – [in] The saving flags, composed of bit fields detailed in Bit Field to indicate the saving options..
pcFileName – [in] The file name where to save the document. The path (absolute or relative) must be provided (use “.\” or “./” for the current directory).
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentClose(A3DPDFDocument *pDoc)
Function to close the document and free all memory.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentEmbedFont(const A3DPDFDocument *pDoc, const A3DUTF8Char *pcFontName, const char *pcEncodingName, A3DPDFELanguage eLanguage)
Function to embed a font in a PDF document.
The font must be embedded before using it in the document. The document must contain at least one page before calling this function.
- Version
11.1
- Parameters
pDoc – [in] The document in which the font will be embedded.
pcFontName – [in] The name of the font
pcEncodingName – [in] The encoding of the font
eLanguage – [in] The language of the font
- Return values
A3D_SUCCESS –
A3DPDF_CANNOT_FIND_FONT –
A3DPDF_CANNOT_CREATE_ENCODING –
A3DPDF_CANNOT_CREATE_FONT –
A3DPDF_CANNOT_EMBED_FONT –
A3DPDF_EMPTY_DOCUMENT –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFFontCheck(const A3DUTF8Char *pcFontName, A3DBool *pbFontSupported, A3DUTF8Char **ppcFontPSName)
Function to check the existence of a PDF font on the local system.
- Version
12.2
- Parameters
pcFontName – [in] The name of the font
pbFontSupported – [out] true if the font can be used, false if not.
ppcFontPSName – [out] The internal font name as used in PDF. This name should be used in Javascript code to set a font with function textFont.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTextCreate(A3DPDFDocument *pDoc, const A3DPDFTextData *pTextData, A3DPDFText **ppText)
Function to create a text object.
The text object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertText.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
pTextData – [in] The text parameters.
ppText – [out] The Text object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTextCreateEx(A3DPDFDocument *pDoc, const A3DPDFTextDataEx *pTextDataEx, A3DPDFText **ppText)
Function to create a text object with extended fonts and languages.
The text object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertText. If the font can’t be found in the directory C:\Windows\Fonts, then the function returns an A3DPDF_CANNOT_FIND_FONT (-1000016) error. WARNING: the initialization function A3DPDFInitializePDFLibAndResourceDirectory must be called before using this function.
- Version
5.0
- Parameters
pDoc – [in] The Document object to work with.
pTextDataEx – [in] The text parameters.
ppText – [out] The Text object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTextGetWidth(A3DPDFText *pText, A3DDouble *pdSizeH, A3DDouble *pdSizeV)
Function to determine the width of a text string.
The width is returned in same units as the page. It may be horizontal or vertical, depending on the writing style. Thus the returned width has both a horizontal and vertical component. Please note that vertical size is not the heigth of the text, but the size for a vertical writing type. For most of fonts, the pdSizeV is zero.
- Version
12.0
- Parameters
pText – [in] The Text object to calculate the size of.
pdSizeH – [out] The horizontal size of the text. Is used if writing style is horizontal.
pdSizeV – [out] The vertical size of the text. Is used if writing style is vertical.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertText(A3DPDFPage *pPage, A3DPDFText *pText, const A3DInt32 iPosLeft, const A3DInt32 iPosBottom)
Function to insert a text in a page.
- Version
4.1
- Parameters
pPage – [inout] The Page object to work with.
pText – [in] The Text object to insert on the page.
iPosLeft – [in] The x coordinate of the insertion point of the text. The insertion point is the bottom left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
iPosBottom – [in] The y coordinate of the insertion point of the text. The insertion point is the bottom left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
- Return values
A3D_SUCCESS –
A3DPDF_CANNOT_EMBED_FONT – if the font is protected and cannot be embedded.
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertTextInTable(A3DPDFPage *pPage, A3DPDFTable *pTable, A3DPDFText *pText, A3DInt32 iRowIndex, A3DInt32 iColumnIndex)
Function to insert a text in a table.
See also
- Version
7.2
- Parameters
pPage – [inout] The Page object to work with.
pTable – [in] The Table object to insert in the table.
pText – [in] The Text object to insert in the table.
iRowIndex – [in] The index of the row of the table’s cell to insert the button (start from 1)
iColumnIndex – [in] The index of the column of the table’s cell to insert the button (start from 1)
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFImageCreate(A3DPDFDocument *pDoc, const A3DPDFImageData *pImageData, A3DPDFImage **ppImage)
Function to create a picture image object.
- Deprecated:
This method is deprecated. Please use A3DPDFImageCreateFromFile or A3DPDFImageCreateFromStream instead.
The image object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertImage.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
pImageData – [in] The image parameters.
ppImage – [out] The Image object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFImageCreateFromFile(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DPDFEImageFormat eFormat, A3DPDFImage **ppImage)
Function to create an image object from a file.
The image object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertImage2.
- Version
10.2
- Parameters
pDoc – [inout] The Document object to work with.
pcFileName – [in] File name of the image file.
eFormat – [in] Format of the image. If kA3DPDFImageFormatUnknown, the format is deducted from file extension.
ppImage – [out] The Image object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFImageCreateFromStream(A3DPDFDocument *pDoc, const A3DUTF8Char *pcStream, const A3DInt32 iLengthStream, const A3DPDFEImageFormat eFormat, A3DPDFImage **ppImage)
Function to create an image object from a file.
The image object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertImage2.
- Version
10.2
- Parameters
pDoc – [inout] The Document object to work with.
pcStream – [in] The buffer.
iLengthStream – [in] The length of the buffer.
eFormat – [in] Format of the image. It is mandatory to be specified for a buffer.
ppImage – [out] The Image object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertImage(A3DPDFPage *pPage, A3DPDFImage *pImage, const A3DInt32 iPosLeft, const A3DInt32 iPosBottom)
Function to insert a static image in a page. With this, an image is positionned on a page but can not be used for interactivity.
- Deprecated:
This function is deprecated. Please use A3DPDFPageInsertImage2 instead.
- Version
4.1
- Parameters
pPage – [inout] The Page object to work with.
pImage – [in] The Image object to insert on the page.
iPosLeft – [in] The x coordinate of the insertion point of the image. The insertion point is the bottom left corner of the image. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
iPosBottom – [in] The y coordinate of the insertion point of the image. The insertion point is the bottom left corner of the image. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertImage2(A3DPDFPage *pPage, A3DPDFImage *pImage, const A3DPDFRectData *pRectData)
Function to insert a static image in a page. With this, an image is positionned on a page but can not be used for interactivity.
- Version
10.2
- Parameters
pPage – [inout] The Page object to work with.
pImage – [in] The Image object to insert on the page.
pRectData – [in] The rectangle to specify the position on the page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFLinkCreate(A3DPDFDocument *pDoc, const A3DPDFLinkData *pLinkData, A3DPDFLink **ppLink)
Function to create a link object.
The link object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertLink.
- Version
5.2
- Parameters
pDoc – [inout] The Document object to work with.
pLinkData – [in] The link parameters.
ppLink – [out] The Link object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertLink(A3DPDFPage *pPage, A3DPDFLink *pLink, const A3DPDFRectData *pRectData)
Function to insert a link in a page.
- Version
5.2
- Parameters
pPage – [in] The Page object to work with.
pLink – [in] The Link object to insert on the page.
pRectData – [in] The rectangle to specify the position on the page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertLinkInTable(A3DPDFPage *pPage, A3DPDFTable *pTable, A3DPDFLink *pLink, A3DInt32 iRowIndex, A3DInt32 iColumnIndex)
Function to insert a link in a table.
See also
- Version
7.2
- Parameters
pPage – [inout] The Page object to work with.
pTable – [in] The Table object to insert in the table.
pLink – [in] The Link object to insert in the table.
iRowIndex – [in] The index of the row of the table’s cell to insert the link (start from 1)
iColumnIndex – [in] The index of the column of the table’s cell to insert the link (start from 1)
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTableCreate(A3DPDFDocument *pDoc, const A3DPDFTableData *pTableData, A3DPDFTable **ppTable)
Function to create a table on a PDF page.
The table object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertTable. WARNING: the initialization function A3DPDFInitializePDFLibAndResourceDirectory must be called before using this function. Also, the binaries of the free add-on TableToPDF must have been copied in the same directory as HOOPS Publish binaries.
- Version
5.1
- Parameters
pDoc – [inout] The Document object to work with.
pTableData – [in] The table parameters.
ppTable – [out] The Table object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTableCellDescCreate(const A3DPDFTableCellDescData *pCellDescData, A3DPDFTableCellDesc **ppCellDesc)
Function to create a cell in a table on a PDF page, from an API definition.
- Version
23.0
- Parameters
pDoc – [inout] The Document object to work with.
pCellDescData – [in] The cell description.
ppCellDesc – [out] The Table object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTableRowDescCreate(const A3DPDFTableRowDescData *pRowDescData, A3DPDFTableRowDesc **ppRowDesc)
Function to create a row in a table on a PDF page, from an API definition.
- Version
23.0
- Parameters
pDoc – [inout] The Document object to work with.
pRowDescData – [in] The row description.
ppRowDesc – [out] The Table object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTableCreateFromDesc(A3DPDFDocument *pDoc, const A3DPDFTableDescData *pTableData, A3DPDFTable **ppTable)
Function to create a table on a PDF page, from an API definition.
The table object is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertTable. WARNING: the initialization function A3DPDFInitializePDFLibAndResourceDirectory must be called before using this function.
- Version
23.0
- Parameters
pDoc – [inout] The Document object to work with.
pTableData – [in] The table description.
ppTable – [out] The Table object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertTable(A3DPDFPage *pPage, A3DPDFTable *pTable, const A3DInt32 iPosLeft, const A3DInt32 iPosTop)
Function to insert a table in a page.
Warning: The positioning is not defined as in the other insertion functions (for texts or images). Here, the position is specified from the top of the page.
- Version
5.1
- Parameters
pPage – [inout] The Page object to work with.
pTable – [in] The Table object to insert on the page.
iPosLeft – [in] The x coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
iPosTop – [in] The y coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageGetFields(A3DPDFPage *pPage, A3DInt32 *piNbFields, A3DPDFField ***pppFields)
Function to retrieve the fields of a PDF page. The fields supported are only form fields created with Acrobat. LiveCycle Designer fields (XFA) are not supported.
When
A3DPDFPageGetFields
returnsA3D_SUCCESS
,pppFields
can be freed by calling A3DPDFPageGetFields with pPage set to nullptr- Memory Management
- Version
6.0
- Parameters
pPage – [in] The Page object to work with.
piNbFields – [out] The number of fields.
pppFields – [out] The array of pointer on fields objects.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageGetField(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, A3DPDFField **ppField)
Function to get a PDF Field from an existing form field on a page.
- Version
10.0
- Parameters
pPage – [in] The Page object on which is the field.
pcFieldName – [in] Unique name for existing field.
ppField – [out] The Field object.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFFieldGetInformation(A3DPDFField *pField, A3DPDFFieldData *pFieldData)
Function to retrieve useful information regarding a field of a document.
- Version
6.0
- Parameters
pField – [in] The Field object to work with.
pFieldData – [out] Data structure completed by the function. Contains the attributes of the field.
-
A3DStatus A3DPDFWidgetGetPosition(A3DPDFWidget *pWidget, A3DPDFRectDData *pRect)
Function to retrieve the position of a widget on a page.
Widgets are fields or more high-level entities.
- Version
10.0
- Parameters
pWidget – [in] The Widget object to work with.
pRect – [out] Data structure completed by the function. Contains the position of the widget.
-
A3DStatus A3DPDFWidgetGetName(A3DPDFWidget *pWidget, A3DUTF8Char **ppcWidgetId)
Function to retrieve the name (identifier) of a widget.
Widgets are fields or more high-level entities.
When
A3DPDFWidgetGetName
returnsA3D_SUCCESS
,ppcWidgetId
can be freed by calling A3DPDFWidgetGetName with pWidget set to nullptr- Memory Management
- Version
10.0
- Parameters
pWidget – [in] The Widget object to work with.
ppcWidgetId – [out] The identifier as a string.
-
A3DStatus A3DPDFPageFieldSetVisibility(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DBool bIsVisible)
Function to set the visibility of a form field.
- Version
4.1
- Parameters
pPage – [inout] The Page object to work with.
pcFieldName – [in] The name of the form field. Only Acroform fields are supported.
bIsVisible – [in] Specifies if the field should be visible or not.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkCreate(A3DPDFDocument *pDoc, const A3DPDF3DArtworkData *p3DArtworkData, A3DPDF3DArtwork **pp3DArtwork)
Function to create the 3D Artwork of the 3D Annot.
- Deprecated:
This function is deprecated. Please use A3DPDF3DArtworkCreate2 instead.
The 3D Artwork object is primarily created with this function, and it should be stored on the 3D Annot through the structure A3DPDF3DAnnotData.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
p3DArtworkData – [in] The 3D Artwork parameters.
pp3DArtwork – [out] The 3D Artwork object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkCreate2(A3DPDFDocument *pDoc, const A3DPDF3DArtworkData2 *p3DArtworkData, A3DPDF3DArtwork **pp3DArtwork)
Function to create the 3D Artwork of the 3D Annot.
The 3D Artwork object is primarily created with this function, and it should be stored on the 3D Annot through the structure A3DPDF3DAnnotData.
- Version
8.1
- Parameters
pDoc – [inout] The Document object to work with.
p3DArtworkData – [in] The 3D Artwork parameters.
pp3DArtwork – [out] The 3D Artwork object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DAnnotCreate(A3DPDFDocument *pDoc, const A3DPDF3DAnnotData *p3DAnnotData, A3DPDF3DAnnot **pp3DAnnot)
Function to create a 3D Annotation object.
The 3D Annotation object is primarily created with this function, and it should be inserted on the page with the functions A3DPDFPageInsert3DAnnot or A3DPDFPageFieldSet3DAnnot.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
p3DAnnotData – [in] The 3D Annot parameters.
pp3DAnnot – [out] The 3D Annot object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsert3DAnnot(A3DPDFPage *pPage, const A3DPDF3DAnnot *p3DAnnot, const A3DPDFRectData *pRectData)
Function to insert a 3D Annot in a page.
Insert a 3D Annot object on the page. Several 3D Annots can be stored on a page.
- Version
4.1
- Parameters
pPage – [inout] The Page object to work with.
p3DAnnot – [in] The 3D Annot to insert on the page.
pRectData – [in] The rectangle to specify the position on the page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageFieldSet3DAnnot(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DPDF3DAnnot *p3DAnnot)
Function to replace the form field specified with a 3D Annot object.
Several 3D Annots can be stored on a page.
- Version
4.1
- Parameters
pPage – [inout] The Page object to work with.
pcFieldName – [in] The name of the form field. Only Acroform fields are supported.
p3DAnnot – [in] The 3D Annot to set.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DStreamCreateFromModelFileAsPRC(A3DPDFDocument *pDoc, A3DAsmModelFile *pModelFile, const A3DRWParamsExportPrcData *pParamsExportData, A3DPDF3DStream **pp3DStream, A3DRWParamsPrcWriteHelper **ppPrcWriteHelper)
Function to create a PRC Stream from a Model File.
The 3D Stream object is primarily created with this function, and it should be stored on the 3D Artwork through the structure A3DPDF3DArtworkData2. This function saves the modelfile in a PRC format, and creates a 3D Stream object from this data.
- Version
4.1
- Parameters
pDoc – [in] The Document object to work with.
pModelFile – [in] The Document object to work with.
pParamsExportData – [in] The PRC export parameters.
pp3DStream – [out] The 3DStream object created.
ppPrcWriteHelper – [inout] Used to get PRC data such as unique identifiers of PRC nodes.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DStreamCreateFromModelFileAsU3D(A3DPDFDocument *pDoc, A3DAsmModelFile *pModelFile, const A3DRWParamsExportU3DData *pParamsExportData, A3DPDF3DStream **pp3DStream)
Function to create a U3D Stream from Model File.
The 3D Stream object is primarily created with this function, and it should be stored on the 3D Artwork through the structure A3DPDF3DArtworkData2. This function saves the modelfile in a U3D format, and creates a 3D Stream object from this data.
- Version
4.1
- Parameters
pDoc – [in] The Document object to work with.
pModelFile – [in] The Document object to work with.
pParamsExportData – [in] The U3D export parameters.
pp3DStream – [out] The 3DStream object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DStreamCreateFromFile(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DBool bIsPRC, A3DPDF3DStream **pp3DStream)
Function to create a Stream from a file.
- Version
4.1
- Parameters
pDoc – [in] The Document object to work with.
pcFileName – [in] The full file path of a PRC or U3D file.
bIsPRC – [in] Specifies the format of the data (true is for PRC, false if for U3D).
pp3DStream – [out] The 3DStream object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFMakeSnapshotFromModelFile(A3DAsmModelFile *pModelFile, const A3DPDFSnapshotOptionsData *pSnapshotOptionsData, const A3DUTF8Char *pcOutputFilename)
Function to create the poster for a view in a model file.
Important: HOOPS Publish uses the graphics driver of the user’s PC. By default, HOOPS Publish attempts to select the graphics driver in this order: DX11->DX9->OpenGL2->OpenGL. To override the default driver selection, set the A3DPOSTERDRV environment variable to one of the following values: DX11, DX9, OGL2, OGL1
- Version
4.1
- Parameters
pModelFile – [in] The modelfile where is defined the 3D data.
pSnapshotOptionsData – [in] The snapshot parameters.
pcOutputFilename – [in] Path to the file name to generate.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFViewCreate(A3DPDFDocument *pDoc, const A3DPDFViewData *pViewData, A3DPDFView **ppView)
Function to create a camera view.
The View object is primarily created with this function, and it should be stored in the 3D Artwork with the function A3DPDF3DArtworkAddView.
- Version
4.1
- Parameters
pDoc – [inout] The Document object to work with.
pViewData – [in] The view parameters.
ppView – [out] The View object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkAddView(A3DPDF3DArtwork *p3DArtwork, const A3DPDFView *pView)
Adds a view on the 3D Annot.
The view is a PDF object and can be activated with PDF actions.
- Version
4.1
- Parameters
p3DArtwork – [inout] The 3D Artwork object to work with.
pView – [in] The View to be stored on the 3D Annot.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkGetViews(A3DPDF3DArtwork *p3DArtwork, A3DUns32 *puiNbViews, A3DPDFView ***pppViews)
Returns the views objects stored in the artwork.
The function returns an array of pointer on views objects. The views returned can be issued from native CAD file, or could have been created with A3DPDF3DArtworkAddView function. Alternatively if no default view is defined, HOOPS Publish automatically creates one. This automatic view is returned at the end of the array. Note that the views are created during the 3D annotation creation (A3DPDF3DAnnotCreate), and the automatic view during the 3D annotation insertion (A3DPDFPageInsert3DAnnot). Consequently, this function should be called after the call to A3DPDFPageInsert3DAnnot to be sure to get the whole list of views.
- Version
4.1
- Parameters
p3DArtwork – [in] The 3D Artwork object to work with.
puiNbViews – [out] The size of the following array of views.
pppViews – [out] The array of pointer on views objects created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFViewGetExternalName(A3DPDFView *pView, A3DUTF8Char **ppcViewId)
Returns the identifier of the view.
The identifier may be used by JavaScript or PDF actions to activate a view. It can also be used to generate poster. The function returns a string.
When
A3DPDFViewGetExternalName
returnsA3D_SUCCESS
,ppcViewId
can be freed by calling A3DPDFViewGetExternalName with pView set to nullptr- Memory Management
- Version
4.1
- Parameters
pView – [in] The View object to work with. This object can be retrieved using the function A3DPDF3DArtworkGetViews
ppcViewId – [out] The identifier as a string.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkGetBoundingSphere(A3DPDF3DArtwork *p3DArtwork, A3DDouble *pdRadius, A3DVector3dData *pCenter)
Get the bounding sphere of the default view of the 3D Artwork.
- Version
5.1
- Parameters
p3DArtwork – [in] The 3D Artwork object to work with
pdRadius – [out] The radius of the bounding sphere.
pCenter – [out] The center of the bounding sphere.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFAnimKeyFrameCreate(const A3DPDFAnimKeyFrameData *pKeyFrameData, A3DPDFAnimKeyFrame **ppKeyFrame)
Function to create a keyframe.
- Version
6.1
- Parameters
pKeyFrameData – [in] The keyframe parameters.
ppKeyFrame – [out] The keyframe object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTargetEntityCreate(const A3DPDFTargetEntityData *pTargetData, A3DPDFTargetEntity **ppTargetEntity)
Structure to define a target entity of a motion.
- Version
7.1
- Return values
A3DPDF_BAD_PARAMETERS – if wrong parameters are given : see A3DPDFTargetEntityData
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFGetEntitiesFromName(A3DAsmModelFile *pModelFile, A3DInt32 iNamesSize, A3DUTF8Char **ppNames, A3DInt32 *piIndexes, A3DPDFTargetEntity ****ppTargetEntities, A3DInt32 **ppiDataSizes)
Utility function to retrieve the targets from their names.
- Version
7.1
- Parameters
pModelFile – [in] The model file which contains the targets.
iNamesSize – [in] The number of names.
ppNames – [in] An array of names of size
iNamesSize
.piIndexes – [in] If the targeted entity had sons, index of the son in the model file tree. Must be -1 if no sons are wanted.
ppTargetEntities – [out] The targeted entities retrieved. If several entities in the model file tree have the same name, all these entities are in the array.
ppiDataSizes – [out] For each name, the number of found entities.
- Return values
A3D_SUCCESS –
A3D_ERROR – if wrong parameters are given
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFAnimMotionCreate(const A3DPDFAnimMotionData *pMotionData, A3DPDFAnimMotion **ppAnimationMotion)
Function to create an animation motion.
- Deprecated:
This function is deprecated. Please use A3DPDFAnimMotionCreate2 instead.
- Version
6.1
- Parameters
pMotionData – [in] The motion parameters.
ppAnimationMotion – [out] The motion object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFAnimMotionCreate2(const A3DPDFAnimMotionData2 *pMotionData, A3DPDFAnimMotion **ppAnimationMotion)
Function to create an animation motion.
- Version
7.1
- Parameters
pMotionData – [in] The motion parameters.
ppAnimationMotion – [out] The motion object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFAnimationCreate(const A3DPDFAnimationData *pAnimationData, A3DPDFAnimation **ppAnimation)
Function to create an animation.
- Version
6.1
- Parameters
pAnimationData – [in] The animation parameters.
ppAnimation – [out] The animation object created.
- Return values
A3D_SUCCESS –
A3DPDF_ANIMATION_NULL_MOTION – if one or several motions are null.
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDF3DArtworkEditAnimationJavascript(A3DPDF3DArtwork *p3DArtwork, const A3DUTF8Char *pcJavascriptFile, A3DBool bUseAnimationFile)
Debug function to edit the JavaScript stream corresponding to the animation data in a file.
If bUseAnimationFile is set to false, the ‘standard’ JavaScript of the animation will be created from the animation data. If true, the output file will be used instead of the animation data. To use the new content, the code execution should be stopped after the call to this function, then the code modified, then the execution restarted. This function must be called before A3DPDF3DAnnotCreate.
- Version
6.1
- Parameters
p3DArtwork – [inout] The artwork which contains the animation.
pcJavascriptFile – [in] The path of the file in which the JavaScript will be outputted. The content of the file can be modified by the user.
bUseAnimationFile – [in] If true, the modified content will be used to generate the final PDF file.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFButtonCreate(A3DPDFDocument *pDoc, const A3DPDFButtonData *pButtonData, A3DPDFButton **ppButton)
Function to create a button.
The button is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertButton.
- Version
7.2
- Parameters
pDoc – [inout] The Document object to work with.
pButtonData – [in] The button parameters. The name is mandatory.
ppButton – [out] The button created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertButton(A3DPDFPage *pPage, A3DPDFButton *pButton, const A3DPDFRectData *pRectData)
Function to insert a button in a page.
- Version
7.2
- Parameters
pPage – [inout] The Page object to work with.
pButton – [in] The button object to insert on the page.
pRectData – [in] The rectangle to specify the position on the page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertButtonInTable(A3DPDFPage *pPage, A3DPDFTable *pTable, A3DPDFButton *pButton, A3DInt32 iRowIndex, A3DInt32 iColumnIndex)
Function to insert a button in a table.
See also
- Version
7.2
- Parameters
pPage – [inout] The Page object to work with.
pTable – [in] The Table object to insert in the table.
pButton – [in] The Button object to insert in the table.
iRowIndex – [in] The index of the row of the table’s cell to insert the button (starts from 1).
iColumnIndex – [in] The index of the column of the table’s cell to insert the button (starts from 1).
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageFieldButtonSetLabel(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DUTF8Char *pcLabel)
Function to set the label of a button form field.
- Version
4.1
- Parameters
pPage – [inout] The Page object to work with.
pcFieldName – [in] The name of the button form field. Only Acroform fields are supported.
pcLabel – [in] The label to set to the field.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFButtonSetLabel(A3DPDFButton *pButton, const A3DUTF8Char *pcLabel)
Function to set the label of a button form field.
- Version
10.0
- Parameters
pButton – [inout] The Button object to work with.
pcLabel – [in] The label to set to the field.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageFieldButtonSetIcon(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DPDFImage *pImage)
Function to set the icon of a button form field.
The image is defined from a A3DPDFImage object. It is always scaled non-proportionally, which means always adapted and stretched to the size of the field. That way, the members m_iWidth and m_iHeight of A3DPDFImageData are not used by this function.
- Version
4.1
- Parameters
pPage – [inout] The Page object to work with.
pcFieldName – [in] The name of the form field. Only Acroform fields are supported.
pImage – [in] The image to store on the button field.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFButtonSetIcon(A3DPDFButton *pButton, const A3DPDFImage *pImage)
Function to set the icon of a button form field.
The image is defined from a A3DPDFImage object. It is always scaled non-proportionally, which means always adapted and stretched to the size of the field. That way, the members m_iWidth and m_iHeight of A3DPDFImageData are not used by this function.
- Version
10.0
- Parameters
pButton – [inout] The Button object to work with.
pImage – [in] The image to store on the button field.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTextFieldCreate(A3DPDFDocument *pDoc, const A3DPDFTextFieldData *pTextFieldData, A3DPDFTextField **ppTextField)
Function to create a text field.
The text field is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertTextField.
- Version
7.2
- Parameters
pDoc – [inout] The Document object to work with.
pTextFieldData – [in] The text field parameters.
ppTextField – [out] The text field created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertTextField(A3DPDFPage *pPage, A3DPDFTextField *pTextField, const A3DPDFRectData *pRectData)
Function to insert a text field in a page.
The text field must have a name before inserting it.
- Version
7.2
- Parameters
pPage – [inout] The Page object to work with.
pTextField – [in] The Text field object to insert on the page.
pRectData – [in] The rectangle to specify the position on the page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertTextFieldInTable(A3DPDFPage *pPage, A3DPDFTable *pTable, A3DPDFTextField *pTextField, A3DInt32 iRowIndex, A3DInt32 iColumnIndex)
Function to insert a text field in a table.
See also
- Version
7.2
- Parameters
pPage – [inout] The Page object to work with.
pTable – [in] The Table object to insert in the table.
pTextField – [in] The Text field object to insert in the table.
iRowIndex – [in] The index of the row of the table’s cell to insert the button (start from 1)
iColumnIndex – [in] The index of the column of the table’s cell to insert the button (start from 1)
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageFieldTextSetValue(A3DPDFPage *pPage, const A3DUTF8Char *pcFieldName, const A3DUTF8Char *pcValue)
Function to set the text of a text form field.
- Version
4.1
- Parameters
pPage – [inout] The Page object to work with.
pcFieldName – [in] The name of the form field. Only Acroform fields are supported.
pcValue – [in] The value to set to the text field. Text fields set as multiline can contain carriage return characters, they must be ‘\r’.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFTextFieldSetValue(A3DPDFTextField *pTextField, const A3DUTF8Char *pcValue)
Function to set the text of a text form field.
- Version
10.0
- Parameters
pTextField – [inout] The Text field object to work with.
pcValue – [in] The value to set to the text field. Text fields set as multiline can contain carriage return characters, they must be ‘\r’.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDigitalSignatureCreate(A3DPDFDocument *pDoc, const A3DPDFDigitalSignatureData *pDigitalSignatureData, A3DPDFDigitalSignature **ppDigitalSignature)
Function to create a DigitalSignature.
The DigitalSignature is primarily created with this function, and it should be positionned on the page with the function A3DPDFPageInsertDigitalSignature.
- Version
8.0
- Parameters
pDoc – [inout] The Document object to work with.
pDigitalSignatureData – [in] The DigitalSignature parameters. The name is mandatory.
ppDigitalSignature – [out] The DigitalSignature created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertDigitalSignature(A3DPDFPage *pPage, A3DPDFDigitalSignature *pDigitalSignature, const A3DPDFRectData *pRectData)
Function to insert a DigitalSignature in a page.
- Version
8.0
- Parameters
pPage – [inout] The Page object to work with.
pDigitalSignature – [in] The DigitalSignature object to insert on the page.
pRectData – [in] The rectangle to specify the position on the page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageDrawRectangle(A3DPDFPage *pPage, const A3DPDFGraphicRectangleData *pGraphicRectangleData)
Function to create a graphic line.
- Version
9.1
- Parameters
pPage – [inout] The Page object to work with.
pGraphicRectangleData – [in] The Graphic rectangle parameters.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageDrawLine(A3DPDFPage *pPage, const A3DPDFGraphicLineData *pGraphicLineData)
Function to create a graphic line.
- Version
9.1
- Parameters
pPage – [inout] The page object to work with.
pGraphicLineData – [in] The Graphic line parameters.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageDrawArc(A3DPDFPage *pPage, const A3DPDFGraphicArcData *pGraphicArcData)
Function to create a graphic circle arc.
- Version
9.1
- Parameters
pPage – [inout] The page object to work with.
pGraphicArcData – [in] The Graphic arc parameters.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageDrawBezierCurve(A3DPDFPage *pPage, const A3DPDFGraphicBezierCurveData *pGraphicBezierCurveData)
Function to create a graphic bezier curve.
- Version
9.1
- Parameters
pPage – [inout] The page object to work with.
pGraphicBezierCurveData – [in] The Graphic Bezier curve parameters.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageDrawCompositePath(A3DPDFPage *pPage, A3DPDFGraphicCompositePathData *pGraphicPathData)
Function to create a graphic composite path.
- Version
9.1
- Parameters
pPage – [inout] The page object to work with.
pGraphicPathData – [in] The parameters of the elements to be drawn.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFActionSetViewCreate(const A3DPDFActionSetViewData *pData, A3DPDFActionSetView **ppAction)
Creates an A3DPDFActionSetView from A3DPDFActionSetViewData structure.
- Version
10.0
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3DPDF_INVALID_VIEW_INDEX –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFActionStartAnimationCreate(const A3DPDFActionStartAnimationData *pData, A3DPDFActionStartAnimation **ppAction)
Creates an A3DPDFActionStartAnimation from A3DPDFActionStartAnimationData structure.
- Version
10.0
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFActionPauseAnimationCreate(const A3DPDFActionPauseAnimationData *pData, A3DPDFActionPauseAnimation **ppAction)
Creates an A3DPDFActionPauseAnimation from A3DPDFActionPauseAnimationData structure.
- Version
10.0
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFActionResumeAnimationCreate(const A3DPDFActionResumeAnimationData *pData, A3DPDFActionResumeAnimation **ppAction)
Creates an A3DPDFActionResumeAnimation from A3DPDFActionResumeAnimationData structure.
- Version
10.0
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFActionSetRenderingStyleCreate(const A3DPDFActionSetRenderingStyleData *pData, A3DPDFActionSetRenderingStyle **ppAction)
Creates an A3DPDFActionSetRenderingStyle from A3DPDFActionSetRenderingStyleData structure.
- Version
10.0
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFActionLaunchURLCreate(const A3DPDFActionLaunchURLData *pData, A3DPDFActionLaunchURL **ppAction)
Creates an A3DPDFActionLaunchURL from A3DPDFActionLaunchURLData structure.
- Version
10.0
- Return values
A3D_INVALID_DATA_STRUCT_SIZE –
A3D_INVALID_DATA_STRUCT_NULL –
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFButtonAddAction(A3DPDFButton *pButton, const A3DPDFAction *pAction)
Adds an action on a button.
- Version
10.0
- Parameters
pButton – [inout] The button object to work with.
pAction – [in] The action to be stored on the button.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFLinkAddAction(A3DPDFLink *pLink, const A3DPDFAction *pAction)
Adds an action on a link.
- Version
10.0
- Parameters
pLink – [inout] The link object to work with.
pAction – [in] The action to be stored on the link.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFDocumentExportAsImage(A3DPDFDocument *pDoc, const A3DInt32 iNumPage, const A3DDouble dScale, const A3DPDFEImageFormat eFormatOut, const A3DUTF8Char *pcOutImgFileName, A3DInt32 *piNbPages)
Export a PDF document to image, treating only one page or all pages.
This version is in beta mode and only supported on windows platform.
- Version
12.0
- Parameters
pDoc – [in] The Document object to work with.
iNumPage – [in] The index of the page. The first page is 0. A value of -1 is to convert all pages of the document. If
iNumPage
is specified (not -1), then one image file is generated with the exact name provided inpcOutImgFileName
. IfiNumPage
is -1, theniNbPages
image files are generated with names “pcOutImgFileName_i.extension”, with ‘i’ = 0 to iNbPages-1 and ‘extension’ being the trigram corresponding to the image format (‘bmp’, ‘jpg’, ‘png’, …). Note that some file images could not exist in case of error. Please always check the existence of the file image before processing it.dScale – [in] Scale to be applied to the image. The image generated is of the size of the PDF page (for ex. 612*792 pixels for a 612*792 points page). the scale here is applied to the size of the image.
eFormatOut – [in] Format of the output image.
pcOutImgFileName – [in] The file name where to save the document. The path (absolute or relative) must be provided (use “.\” or “./” for the current directory).
piNbPages – [out] The number of pages in the document. It is useful if -1 is provided to
iNumPage
to process all generated pages.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DConvertPDFToImage(const A3DUTF8Char *pcInPDFFilename, const A3DInt32 iNumPage, const A3DDouble dScale, const A3DPDFEImageFormat eFormatOut, const A3DUTF8Char *pcOutImgFileName, A3DInt32 *piNbPages)
-
A3DStatus A3DPDFRichMediaAnnotCreateFromFile(A3DPDFDocument *pDoc, const A3DPDFRichMediaAnnotData *pRichMediaAnnotData, const A3DUTF8Char *pcFileName, A3DPDFRichMediaAnnot **ppRichMediaAnnot)
Function to create a RichMedia Annotation object.
The RichMedia Annotation object is primarily created with this function, and it should be inserted on the page with the functions A3DPDFPageInsertRichMediaAnnot.
- Version
12.2
- Parameters
pDoc – [inout] The Document object to work with.
pRichMediaAnnotData – [in] The RichMedia Annot parameters.
pcFileName – [in] The file name of the rich media input file. The file format is deducted from file extension. Supported file formats for video are : QuickTime Movie (.mov) ; MPEG (.mp4, .m4v) ; 3GPP Movie (.3gp, .3g2). Supported file formats for audio are : mp3
ppRichMediaAnnot – [out] The RichMedia Annot object created.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code
-
A3DStatus A3DPDFPageInsertRichMediaAnnot(A3DPDFPage *pPage, const A3DPDFRichMediaAnnot *pRichMediaAnnot, const A3DPDFRectData *pRectData)
Function to insert a RichMedia Annot in a page.
Insert a RichMedia Annot object on the page. Several RichMedia Annots can be stored on a page.
- Version
12.2
- Parameters
pPage – [inout] The Page object to work with.
pRichMediaAnnot – [in] The RichMedia Annot to insert on the page.
pRectData – [in] The rectangle to specify the position on the page.
- Return values
A3D_SUCCESS –
- Returns
A3D_SUCCESS in case of success or an error code