Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Net.HTTP.Request is not working on Adobe Reader

New Here ,
Oct 28, 2016 Oct 28, 2016

Hi,

I made one JS file and placed in Reader's and Acrobat's javascript folder for posting the opened PDF document to server using below code.

app.addMenuItem({ cName: "Upload Data", nPos: "Close", cParent: "File", cExec: "runExtract()" });

var runExtract = app.trustedFunction(function() {

  app.beginPriv();

    try {

        var params =

          {

            cVerb: "POST",

              cURL: "http://domain/Service/upload.ashx",

              aHeaders: [{ name: "fileName", value: this.documentFileName }],

              oRequest: Collab.documentToStream(this)

          };

        var responseStream = Net.HTTP.request(params);

        var response = SOAP.stringFromStream(responseStream);

    }

    catch (e) {

        app.alert({ cMsg: e.message, cTitle: "Exception" });

    }

  app.endPriv();

});

And the above code is working good with Adobe Acrobat Pro, but not Adobe Reader.

I found the issue with Net.HTTP.request.

Suggest me solution to resolve the issue.

Thanks in advance.

Regards,

Chandra.

TOPICS
Acrobat SDK and JavaScript , Windows
2.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 28, 2016 Oct 28, 2016

What is the console contents in Reader?

What does the Quick Bar say about availability in Reader?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 28, 2016 Oct 28, 2016

Hi,

Thanks for reply.

I just started working on created JS file.

The PDF is just scanned image. If I'm not wrong about console contents. If that is wrong, can I have more information regarding the console content in Reader.

Regarding What does the Quick Bar say about availability in Reader?. I'm confusing.

Thanks,

Chandra.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 28, 2016 Oct 28, 2016

In order to use this method in Reader a special right has to be applied to the file using one of the LiveCycle server applications by Adobe. These applications are very expensive, though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 28, 2016 Oct 28, 2016

RCPaluri wrote:

...

Regarding What does the Quick Bar say about availability in Reader?. I'm confusing.

Thanks,

Chandra.

Look at the JavaScript Reference. There you will see a F in the Quick Bar.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 28, 2016 Oct 28, 2016

Sorry,

If I'm not wrong, is this one?

If no, where should I check those JavaScript references. And how to add those references to Reader.

Thanks,

Chandra.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 28, 2016 Oct 28, 2016

I'm getting below error:

Thanks,

Chandra.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 28, 2016 Oct 28, 2016
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 28, 2016 Oct 28, 2016

The JavaScript Reference or JavaScript API is the essential documentation all JavaScript programmers will need. Each method has a box - quick bar - showing critical information to check before use. NEVER assume methods will work in Reader without checking.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines