
##################################################
A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields
##################################################

.. c:function:: A3DStatus A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DUTF8Char *pcAppendStringToFieldNames, A3DPDFPage **ppPage)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields(:c:type:`~A3DPDFDocument`\ \* **pDoc**\ , *const* :c:type:`~A3DUTF8Char`\ \* **pcFileName**\ , *const* :c:type:`~A3DUTF8Char`\ \* **pcAppendStringToFieldNames**\ , :c:type:`~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.
   
   
   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**\ : The Document object to work with.
   
      **pcFileName**\ : The input file name of the PDF template.
   
      **pcAppendStringToFieldNames**\ : The string that is appended to all form fields. Please see thedetails sectionbelow for more information.
   
      **ppPage**\ : The Page object for the last page inserted.
   
   
   **Returns**
   
   
      A3D_SUCCESS in case of success or an error code
   
   




