You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2015/02/06 17:32:36 UTC

[jira] [Comment Edited] (PDFBOX-2045) Merging PDFs with a Form has no effect

    [ https://issues.apache.org/jira/browse/PDFBOX-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309381#comment-14309381 ] 

Maruan Sahyoun edited comment on PDFBOX-2045 at 2/6/15 4:32 PM:
----------------------------------------------------------------

The special PDF is a dynamic XFA form where merging with other documents won't give you the expected result. Trying to merge that document with another PDF using Adobe Acrobat will be refused. Merging with PDFBox is possible i.e. the pages from the other document are added but the added pages are not visible.

Why is that? A dynamic XFA form does not have AcroForms fields, the /Fields key in the AcroForms dictionary is empty. Instead the XFA definition is taken and rendered at runtime. The other content of the document is ignored.

To merge such a document it first has to be rendered into a 'regular' PDF.

I'd propose to add an error message when there is such document to be merged and don't merge it at all which will make our behavior similar to how Acrobat is handling that. There is not a lot more we can do with regards to merging.
 


was (Author: msahyoun):
The special PDF is a dynamic XFA form where merging with other documents won't give you the expected result. Trying to merge that document with another PDF using Adobe Acrobat will be refused. Merging with PDFBox is possible i.e. the pages from the other document are added but the added pages are not visible.

Why is that? A dynamic XFA form does not have an AcroForms fields, the /Fields key in the AcroForms dictionary is empty. Instead the XFA definition is taken and rendered at runtime. The other content of the document is ignored.

To merge such a document it first has to be rendered into a 'regular' PDF.

I'd propose to add an error message when there is such document to be merged and don't merge it at all which will make our behavior similar to how Acrobat is handling that. There is not a lot more we can do with regards to merging.
 

> Merging PDFs with a Form has no effect
> --------------------------------------
>
>                 Key: PDFBOX-2045
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2045
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm, Utilities
>    Affects Versions: 1.8.4, 1.8.5, 1.8.6, 2.0.0
>            Reporter: Gerhard Temper
>            Assignee: Maruan Sahyoun
>             Fix For: 2.0.0
>
>         Attachments: specialpdf-tree.png, specialpdf.pdf, specialpdfmerged-tree.png
>
>
> Merging attached special PDF (a form) results in a PDF consisting only of the PDF form ignoring all other PDFs without any error.
> Command line to reproduce the problem:
> java -jar pdfbox-app-1.8.4.jar PDFMerger page1.pdf specialpdf.pdf result.pdf



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org