Skip to main content
pnishi
Participant
September 25, 2017
Question

I want to use the 'this.createDataObject' and this.exportDataObject' on Acrobar Reader DC.

  • September 25, 2017
  • 2 replies
  • 2397 views

When I used the following javascript , It was displaed "NotAllowedError".

- this.createDataObject('output.csv', "TEST");

- this.exportDataObject({ cName:'output.csv', nLaunch:'2'});

I am looking many web-site , I find that I must buy something option.

Is it right ?

What should I buy just to do this?

Or

Are there anyway to do this ?

Best Regards.

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
November 21, 2017

As Try as stated, you cannot export a custom CSV file from Reader to the user's file system with JavaScript alone. Acrobat JavaScript is heavily restricted for security reasons, and Reader is restricted even more because it's a Reader.

If you want to do this you need to get Acrobat Std/Pro or use an indirect method,

Here are a couple of ides for indirect methods:

1. A VB/VBA program that uses the Acrobat IAC to call JavaScript functions for building and returning the CSV text. Then the VB program can write to disk, or if for example, it's a VBA script in Excel, it could just fill out a spreadsheet.

2. Submit the CSV data to a server script which saves the data on a server, in Google Sheets for example, or returns HTML to display the CSV data.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
September 25, 2017

You can use exportDataObject in Reader, but not createDataObject, unless a very special type of right is applied to the file using the LiveCycle Rights Management application (I believe).

pnishi
pnishiAuthor
Participant
September 25, 2017

Dear

Thank you for your quick reply.

If you know please advice us.

I want to use two functions for export the text-comment to a text file or csv file.

Do you know how to do it ? Do we need LiveCycle Rights Management ?

My first code was :var fileName = this.documentFileName.replace(/\.[^.]+$/, '');
this.createDataObject(fileName+".csv", "TEST Comment");

this.exportDataObject(fileName+".csv");

try67
Community Expert
Community Expert
September 25, 2017

I can't help you further with this issue. You'll need to contact Adobe directly to find out the price for this service.
Expect it to be pretty steep...