Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Saving txt file from PDF

Avatar

Former Community Member

Hello!

Is it possible to save a TXT file directly from a PDF?

Or the only way to save anything from a PDF is using a webservice?

Thank you for any ideas!

Marcos

3 Replies

Avatar

Level 10

With Acrobat you can save the written content of any PDF file as a txt file, excepting XFA forms.

For those files the saved txt file will be blank.

Avatar

Former Community Member

Hi Radzmar,

How do I save it? I'd like to save this when the user presses a button.

Thank you!

Marcos

Avatar

Level 10

Hmm,

the problem is, you generally can't do this with a buttons script.

It's because the menu item used for this method is not listed in whitelist of those menu items allowed to be executed via scriptings.

You can add this menu item to the whitelist, but it's has to be done in the registry on every computer using this form (risky and difficult to realize).

Also, if the menu Item has not be execute once before manually by the user, the script also fails.

I have no idea what causes this behavior in Acrobat, very strange.

Whatever. Here is the script I used to save a PDF as txt (I only tested it in Acrobat X via console):

app.execMenuItem("SaveAsSubmenu.avSaveAsMoreSaveOptionsSubmenu.com.adobe.acrobat.plain-text");