# A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields

A3DStatus `A3DPDFDocumentAppendPageFromPDFFileAndSuffixFields`(A3DPDFDocument *pDoc, const A3DUTF8Char *pcFileName, const A3DUTF8Char *pcAppendStringToFieldNames, A3DPDFPage **ppPage)
  `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.

  ## 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

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Exchange in your own language, or choose a sample question below to start a conversation:

What is HOOPS Exchange?
What are the latest release notes for HOOPS Exchange?
How do I start evaluating HOOPS Exchange?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...