Skip to content

Merge page from same document source #312

Answered by gettalong
loust333 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @loust333,

There are a few problems with the code:

  • The main reason why this doesn't work is that AcroForm fields with the same full name are deemed to be just one field. When you copy the page, the field names stay the same and thus page 4 doesn't have separate fields.

  • The way you copy the page in #merge doesn't work in the general case. You need to correctly import the page (see https://hexapdf.gettalong.org/examples/merging.html#merging-pdf-files for details), otherwise there will be problems.

  • AcroForm fields are actually separate from their appearance on a page. This allows, for example, a single field to appear in multiple places. So when you want to copy a page from a PDF a…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@loust333
Comment options

@gettalong
Comment options

@loust333
Comment options

@gettalong
Comment options

@loust333
Comment options

Answer selected by loust333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants