Module to define and access a Page in a document. More...
Data Structures | |
struct | A3DPDFPageData |
A3DPDFPageData structure. More... | |
struct | A3DPDFPageData2 |
A3DPDFPageData2 structure. More... | |
struct | A3DPDFRectData |
A3DPDFRectData structure: structure to define a rectangle placement in the PDF page. More... | |
struct | A3DPDFRectDData |
A3DPDFRectDData structure: structure to define a rectangle placement in the PDF page, in double precision. More... | |
Enumerations | |
enum | A3DPDFEPageOrientation { kA3DPDFPagePortrait = 0, kA3DPDFPageLandscape } |
Page orientation of the PDF document. More... | |
enum | A3DPDFEPageSize { kA3DPDFPage11x17 = 0, kA3DPDFPageA3, kA3DPDFPageA4, kA3DPDFPageA5, kA3DPDFPageB4JIS, kA3DPDFPageB5JIS, kA3DPDFPageExecutive, kA3DPDFPageLegal, kA3DPDFPageLetter, kA3DPDFPageTabloid, kA3DPDFPageB4ISO, kA3DPDFPageB5ISO, kA3DPDFPageCustom } |
Page size of the PDF document. More... | |
Detailed Description
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.
Enumeration Type Documentation
◆ A3DPDFEPageSize
enum A3DPDFEPageSize |
Page size of the PDF document.
- Version
- 4.1
◆ A3DPDFEPageOrientation
Function Documentation
◆ A3DPDFDocumentCreateUniquePage()
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.
- Parameters
-
[in,out] pDoc The current document on which the new page will be added. [in] pPageData The page data parameters. [out] ppPage The newly-created page.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 4.1
◆ A3DPDFDocumentCreateUniquePage2()
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.
- Parameters
-
[in,out] pDoc The current document on which the new page will be added. [in] pPageData The page data parameters. [out] ppPage The newly-created page.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 7.2
◆ A3DPDFDocumentGetUniquePage()
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.
- Parameters
-
[in] pDoc The Document object to work with. [out] ppPage The Page object.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 4.1
◆ A3DPDFDocumentGetNumberPages()
A3DStatus A3DPDFDocumentGetNumberPages | ( | const A3DPDFDocument * | pDoc, |
A3DInt32 * | piNbPages | ||
) |
Function to get the number of pages in the document.
- Parameters
-
[in] pDoc The Document object to work with. [out] piNbPages 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.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 6.0
◆ A3DPDFDocumentGetPage()
A3DStatus A3DPDFDocumentGetPage | ( | const A3DPDFDocument * | pDoc, |
const A3DInt32 | iNumPage, | ||
A3DPDFPage ** | ppPage | ||
) |
Function to get a page in the document.
- Parameters
-
[in] pDoc The Document object to work with. [in] iNumPage The index of the page. The first page is 0. [out] ppPage The Page object.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 6.0
◆ A3DPDFDocumentRemovePages()
A3DStatus A3DPDFDocumentRemovePages | ( | const A3DPDFDocument * | pDoc, |
const A3DInt32 | iFirstPage, | ||
const A3DInt32 | iLastPage | ||
) |
Function to remove pages in the document.
- Parameters
-
[in,out] pDoc The Document object to work with. [in] iFirstPage The index of the first page to remove. The first page is 0. [in] iLastPage The index of the last page to remove.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 6.0
◆ A3DPDFDocumentAppendNewPage()
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.
- Parameters
-
[in,out] pDoc The Document object to work with. [in] pPageData The page parameters. [out] ppPage The Page object for the new page.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 4.2
◆ A3DPDFDocumentAppendNewPage2()
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.
- Parameters
-
[in,out] pDoc The Document object to work with. [in] pPageData The page parameters. [out] ppPage The Page object for the new page.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 7.2
◆ A3DPDFDocumentAppendPageFromPDFFile()
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.
- Parameters
-
[in,out] pDoc The Document object to work with. [in] pcFileName The input file name of the PDF template. [out] ppPage The Page object for the last page inserted.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 4.2
◆ A3DPDFDocumentAppendPageFromPDFFileEx()
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.
- Parameters
-
[in,out] pDoc The Document object to work with. [in] pcFileName The input file name of the PDF template. [in] bRenameFields 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. [out] ppPage The Page object for the last page inserted.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- Version
- 4.3
◆ A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields()
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.
- Parameters
-
[in,out] pDoc The Document object to work with. [in] pcFileName The input file name of the PDF template. [in] pcAppendStringToFieldNames The string that is appended to all form fields. Please see the details section below for more information. [out] ppPage The Page object for the last page inserted.
- Returns
- A3D_SUCCESS in case of success or an error code
- Return values
-
A3D_SUCCESS
- 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.