-
-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fields get a new parent in merged documents #778
Comments
Please describe usecase. |
Here is one use case:
Now as the field names in the resulting document are different depending on which documents have been combined (and in which order), filling out the fields in the resulting document automatically is not possible. |
tricky.. let me think about this. |
I suggest you merge your files first, then do a |
As written above, this unfortunately is not possible: The fillout data is generated by scripts for the different small PDF documents, i.e. not directly by the user. However depending on the ordering and depending on which PDF documents are merged, the field names in the resulting document differ and don't match the generated data from the scripts. |
When documents containing fields are merged, a new parent for the fields of the source document is created and the source fields are added there:
pdfcpu/pkg/pdfcpu/merge.go
Lines 350 to 354 in b89d7b1
This will cause problems if the (unmodified) field names are expected, e.g. for filling out later.
Example:
path1.field1
andpath2.field2
.path1.field2
.Expected result:
The fields in the merged document are named
path1.field1
,path1.field2
andpath2.field2
.Instead:
The fields in the merged document are named
path1.field2
,1.path1.field1
and1.path2.field2
.The text was updated successfully, but these errors were encountered: