InsertPages Losing Form Data

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

InsertPages Losing Form Data

Post by jeffp »

When using InsertPages to insert one or pages from a source PDF containing form data to a target PDF, the inserted pages from the source PDF lose their form data. I tried this inside the ViewerAX itself using Document>>Insert Pages with the same result. When using Adobe Acrobate Pro and doing the same insert, the form data gets preserved after the insert.

Attached are some test files.

Open file02.pdf and notice that it has some form data filled out.

Now open file01.pdf and then insert file02.pdf after the last page of file01.pdf. After the insert, the file02.pdf pages appear at the end of file01.pdf put the form data is gone.

--Jeff
You do not have the required permissions to view the files attached to this post.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19883
Joined: Mon Jan 12, 2009 8:07 am

Re: InsertPages Losing Form Data

Post by Stefan - PDF-XChange »

Hello Jeff,

The problem is not only in loosing the data but the form fields as well.
We are not yet able to move a page from one document to another and preserve the form(s) that could be present on that page. We are working on this for ver3, but when exactly it will be available I can not say for now.

Best,
Stefan
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: InsertPages Losing Form Data

Post by jeffp »

Thanks. Let me know when you get it working.

This came from one of those customers who thinks if it doesn't work just like Adobe then there must be bug.

I'm suggesting to do a Flatten first, then you can append without issue.

--Jeff
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7361
Joined: Wed Mar 25, 2009 10:37 pm

Re: InsertPages Losing Form Data

Post by Paul - PDF-XChange »

Hi Jeff,

flattening the document will allow the files to merge but will of course remove the interactive nature of the document.

hth
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19883
Joined: Mon Jan 12, 2009 8:07 am

Re: InsertPages Losing Form Data

Post by Stefan - PDF-XChange »

Good Morning Jeff,

As they say - the morning is wiser than the evening - another idea that just came to my mind is that they can try to merge file01.pdf into file02.pdf this way the form will stay intact and you will add new pages to it.
This will of course work if file02.pdf is not security protected, and will of course not work if both files you try to merge have forms in them - but it's still worth mentioning!

Cheers,
Stefan
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: InsertPages Losing Form Data

Post by jeffp »

Thanks. I'll mention this but in many cases both pdfs have form data.

Any chance this will make it in before 3x?
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19883
Joined: Mon Jan 12, 2009 8:07 am

Re: InsertPages Losing Form Data

Post by Stefan - PDF-XChange »

Hi Jeff

We do not have plans to add any new major features in ver 2 now.
All of them are planned for ver3 and beyond.
The few build of ver2 left to be released from now till the end of May will mostly be bug fix ones.

Best,
Stefan
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: InsertPages Losing Form Data

Post by jeffp »

Ok. Here's another alternative.

Is there a way to run the "Flattern Comments" programmatically without the options dialog poping up?

If so, within my code the does the insert/append, I could flatten the form fields before is insert/append the pages. I'd only want to flatten form fields in this case, not general comments or "non-printable" objects since they come through just fine in an append.

Is this possible?
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7361
Joined: Wed Mar 25, 2009 10:37 pm

Re: InsertPages Losing Form Data

Post by Paul - PDF-XChange »

Hi jeffp,

I asked the devs about this and while at present one can programatically identify form fields the functionality to flatten only those is not implemented. You could of course flatten pages programatically, even I believe specifying printable or non printable annotations - would it be practical for you to grab the annotations, remove them, flatten the page and re-apply the annotation?

V3 again should be able to flatten only the form fields, if not in the initial release then possibly in a subsequent one.

hth
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
jeffp
User
Posts: 923
Joined: Wed Sep 30, 2009 6:53 pm

Re: InsertPages Losing Form Data

Post by jeffp »

I can deal with flattening everything, but can I flatten all pages programmatically without have the Flatten Comments dialog appear?

I didn't see a way for this in the API docs.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19883
Joined: Mon Jan 12, 2009 8:07 am

Re: InsertPages Losing Form Data

Post by Stefan - PDF-XChange »

Hello Jeff,

I believe that yes - you can do that with some JS Code:
https://forum.pdf-xchange.com/ ... 36&t=10962

Best,
Stefan