Hi,
Is there a PDF-Tools SDK equivalent for the JS flattenPages() function or the Viewer SDK FlattenAnnots function? Actually, my goal is to extract the text from form fields using the Tools SDK...
TIA,
Jan
PDF-Tools SDK equivalent of FlattenAnnots
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- User
- Posts: 18
- Joined: Mon Apr 23, 2012 12:38 pm
-
- User
- Posts: 205
- Joined: Fri May 18, 2012 8:41 pm
Re: PDF-Tools SDK equivalent of FlattenAnnots
Hi wings software,
Thank you for your post.
You can use the JavaScript functions from PDF-Tools with function: PXC_AddJavaScript to use your JavaScript functions to get the fields values.
Another way would be to export the data to a FDF file.
This has been covered previously in another forum thread here:
https://forum.pdf-xchange.com/ ... ext#p21849
Thanks.
Thank you for your post.
You can use the JavaScript functions from PDF-Tools with function: PXC_AddJavaScript to use your JavaScript functions to get the fields values.
Another way would be to export the data to a FDF file.
This has been covered previously in another forum thread here:
https://forum.pdf-xchange.com/ ... ext#p21849
Thanks.
-
- User
- Posts: 18
- Joined: Mon Apr 23, 2012 12:38 pm
Re: PDF-Tools SDK equivalent of FlattenAnnots
Nico,
Any alternative not involving the PDF Viewer?
Thanks,
Jan
Reading the documentation I was under the impression that PXC_AddJavaScript would add some JS code that is executed within the viewer. I tried to add "this.flattenPages" via PXC_AddJavaScript and it seemed to work at first, but when I opened the file in Acrobat Reader it still showed the form fields. So obviously, the java script is only run in the viewer, and the flattened text is not in the PDF file.Nico - Tracker Supp wrote:You can use the JavaScript functions from PDF-Tools with function: PXC_AddJavaScript to use your JavaScript functions to get the fields values.
Any alternative not involving the PDF Viewer?
Thanks,
Jan
-
- User
- Posts: 205
- Joined: Fri May 18, 2012 8:41 pm
Re: PDF-Tools SDK equivalent of FlattenAnnots
Hi wings software,
Yes, that's right. I'm afraid there is not other way to do it but using the Viewer JavaScript functions.
Next version of the Viewer will allow to access the form objects directly.
Thanks.
Sincerely,
Yes, that's right. I'm afraid there is not other way to do it but using the Viewer JavaScript functions.
Next version of the Viewer will allow to access the form objects directly.
Thanks.
Sincerely,