Page Module
Types
Fields
Functions
|
|
|
|
|
|
|
|
|
|
Detailed Description
- group a3d_pdf_page_module
Module to define and access a Page in a document.
This module describes the functions and structures that allow you to define a PDF Page in the document.
Type Documentation
-
enum A3DPDFEPageSize
Page size of the PDF document.
- Version
4.1
Values:
-
enumerator kA3DPDFPage11x17
Standard 11*17 format. size in points: 792 * 1224.
-
enumerator kA3DPDFPageA3
Standard A3 format. size in points: 842 * 1190.
-
enumerator kA3DPDFPageA4
Standard A4 format. size in points: 595 * 842.
-
enumerator kA3DPDFPageA5
Standard A5 format. size in points: 420 * 595.
-
enumerator kA3DPDFPageB4JIS
Standard B4 JIS format. size in points: 728 * 1031.
-
enumerator kA3DPDFPageB5JIS
Standard B5 JIS format. size in points: 515 * 728.
-
enumerator kA3DPDFPageExecutive
Standard Executive format. size in points: 522 * 756.
-
enumerator kA3DPDFPageLegal
Standard Legal format. size in points: 612 * 1008.
-
enumerator kA3DPDFPageLetter
Standard Letter format. size in points: 612 * 792.
-
enumerator kA3DPDFPageTabloid
Standard Tabloid format. size in points: 792 * 1224.
-
enumerator kA3DPDFPageB4ISO
Standard B4 ISO format. size in points: 709 * 1001.
-
enumerator kA3DPDFPageB5ISO
Standard B5 ISO format. size in points: 499 * 709.
-
enumerator kA3DPDFPageCustom
The page format must be defined using SetPageSize.
Function Documentation
Warning
doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 60] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ————————————————————^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^
Warning
doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 60] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ————————————————————^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^
Warning
doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 60] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ————————————————————^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^
-
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
Warning
doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 60] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ————————————————————^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^
-
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 –
A3D_INVALID_ENTITY_NULL – if
pDoc
orppPage
are null.A3D_INVALID_DATA_STRUCT_NULL – if
pPageData
is null.
- Returns:
A3D_SUCCESS in case of success or an error code
Warning
doxygenfunction: Unable to resolve function “A3D_API_DEPRECATED” with arguments “None”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expected identifier in nested name. [error at 60] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ————————————————————^ If the function has a return type: Error in declarator If declarator-id with parameters-and-qualifiers: Invalid C++ declaration: Expected identifier in nested name. [error at 19] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) ——————-^ If parenthesis in noptr-declarator: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 29] A3D_API_DEPRECATED (A3DStatus, A3DPDFDocumentAddImageAsIcon,(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)) —————————–^
-
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.
- Version
4.3
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.
- 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 –
A3D_INVALID_ENTITY_NULL – if
pDoc
,pcFileName
orppPage
are null.A3DPDF_CANNOT_ACCESS_FILE – if
pcFileName
is not valid.
- 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.
- 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.
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.
- 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 –
A3D_INVALID_ENTITY_NULL – if
pDoc
,pcFileName
orppPage
are null.A3DPDF_CANNOT_ACCESS_FILE – if
pcFileName
is invalid.
- Returns:
A3D_SUCCESS in case of success or an error code