PDF-Tools SDK equivalent of FlattenAnnots

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan

Post Reply
wings software
User
Posts: 19
Joined: Mon Apr 23, 2012 12:38 pm

PDF-Tools SDK equivalent of FlattenAnnots

Post by wings software » Mon Aug 27, 2012 12:56 pm

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

Nico - Tracker Supp
User
Posts: 220
Joined: Fri May 18, 2012 8:41 pm

Re: PDF-Tools SDK equivalent of FlattenAnnots

Post by Nico - Tracker Supp » Mon Aug 27, 2012 8:19 pm

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:
http://www.tracker-software.com/forum3/ ... ext#p21849
Thanks.

wings software
User
Posts: 19
Joined: Mon Apr 23, 2012 12:38 pm

Re: PDF-Tools SDK equivalent of FlattenAnnots

Post by wings software » Tue Aug 28, 2012 8:16 am

Nico,
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.
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.

Any alternative not involving the PDF Viewer?

Thanks,

Jan

Nico - Tracker Supp
User
Posts: 220
Joined: Fri May 18, 2012 8:41 pm

Re: PDF-Tools SDK equivalent of FlattenAnnots

Post by Nico - Tracker Supp » Tue Aug 28, 2012 4:29 pm

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,

Post Reply