Rank: Newbie
Groups: Registered
Joined: 5/29/2017(UTC) Posts: 2 
|
Hi,
I'm using pdfium on WinForms. I have created a PDF which contains form fields. First I copy the template to a new filename. I load the file using LoadDocument() and it displays correctly I then fill in all of the form fields by typing into them and I click Save. A save method is then called which saves the PDF back to the file .Save(SaveFlags.NoIncremental) However, not all of my changes are being saved back (e.g. the last field remains empty even though I entered text into it before saving). Can you advise the correct methods I should be using for this scenario?
Thanks, Joe
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
Could you please provide me that pdf file
|
|
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 5/29/2017(UTC) Posts: 2 
|
Hi Paul, I think I've just figured out a workaround to resolve this issue. On further testing it seems that it's always the last form field that doesn't get saved. However, this only happens if I leave the cursor in this field when clicking save. If I manually click into some other field it works. I found a method in the API that seems to do this without the user needing to click away from the last field - Document.FormFill.ForceToKillFocus() If I call this method before the Save() all seems to be OK.
Thanks, Joe
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
the changes in a field are applied when the field loses a focus. so you should click to another field or call ForceToKillFocus method to apply the changes before saving. Edited by user Tuesday, May 30, 2017 2:04:33 PM(UTC)
| Reason: Not specified
|
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close