Opening encrypted attachment using Acrobat JavaScript exportDataObject

Hello Folks,
We are trying to implement an open button in our main pdf file, which tries to open an encrypted attachment in the pdf doc. The attachment is also a pdf document. Below is the code that we are using :-
var doc = event.target;
var dataObjects = doc.dataObjects;
var file;
var e;
var i;
for (i = 0; i < dataObjects.length; i++)
    file = dataObjects[i].name;
    try
        doc.exportDataObject({ cName: file, nLaunch: 2, bAllowAuth:true  });
    catch(e)
        app.alert(e.message);
This code works fine, when the user clicks open button, a dialog box opens asking for username and password, which tries to connect to the Rights Management Server and authenticates user. The authentication is derived by custom policies for each user on the Rights Management Server.
The problem is that if the user clicks cancel button on the login dialog box, then the box closes, and the control goes in the exception block, which is fine, but next time the user clicks on open button the control directly goes to the exception block, without opening the login dialog box.
And then the user has to close acrobat reader completly and open the file again to be able to click on open button and get the login dialog box.
I am open to implement any kind of Javascript solution, let me know if anyone has any pointers.
Thanks,
Amit.

That seems right to me. Is there a way to prevent that caching ? Like programatically or through configuration ?
One thing I forgot to mention, this does not happen on all the machines, on some machines, it works fine, I click on open, click on cancel, again click open and the box appears just fine. While on other machines, once I hit cancel on the login dialog box, the dialog box never appears again, the above code keeps going in the exception block.
So I am wondering if it is because of some setting in acrobat reader ?
Also, if its a caching issue, do you think that there could be a programmatic or configuration workaround this issue ? like cleanig all cache before attempting to open attachment ? or cleaning the whole acrobat temp directory ? or may be using some routine other than exportDataObject ?
I am asking this because the attachment section in the left side navigation buttons panel, built into Acrobat Reader works fine, I mean if I open the attachment from that section, and hit cancel on login dialog box, and try to open again, it just keeps opening fine. It fails only with the above code on some machines....
Thanks,
Amit.

Similar Messages

  • Examine Document... using Acrobat javascript

    Hi,
    I am using Acrobat 9 version.
    I have a pdf which has some hidden text. I am using Acrobat menu  Document -->Examine Document... to find if the PDF has any hidden text or not.  If the Examine Document... shows the Hidden text (1 page), then I remove the hidden text using Remove button at the bottom of the examine status window.
    My question is, it is possible to do this task using Acrobat Javascript.
    I am having more than 500 PDFs, so opening each and evert PDF and examining the documnet takes more time. If there are options in Javascript, please let me know.
    Thanks,
    Gopal

    Thanks for your reply.
    The preflight option "List invisible text objects" does not generate the report saying that the PDF has invisible text objects.
    Also, "PDF names"means name of the PDF document (Ex: sample.pdf). Is there any way to achieve this using Javascript code?
    Thanks,
    Gopal

  • I am unable to open encrypted emails using webmail and a CAC reader.  It says "content can't be displayed because the S/MIME control isn't available."  I'm using a Macbook Pro with 10.10 OS and have tried both Safari and Chrome.

    I am using a Macbook Pro with OS X Yosemite 10.10.2.  I am unable to open encrypted emails using webmail.  I have verified my certificates are loaded in the keychain for my military common access card while using a CAC reader.  When I try to view the message it gives me the error saying "content can't be displayed because the S/MIME control isn't available." 

    I am using a Macbook Pro with OS X Yosemite 10.10.2.  I am unable to open encrypted emails using webmail.  I have verified my certificates are loaded in the keychain for my military common access card while using a CAC reader.  When I try to view the message it gives me the error saying "content can't be displayed because the S/MIME control isn't available." 

  • Opening a PDF using Acrobat X

    I would like to open a PDF using Acrobat X. I need to input boxes into my PDF form so that the form can be filled out on the computer by typing rather than having to print it out and hand write responses. I have downloaded the trial version of the Acrobat X. When I try to open the PDF with Acrobat X, it doesn't do it and I am unable to make the changes I wish. Any help would be greatly appreciated.
    Thank you.

    When you open the pdf it doesn't do what? If you can open Acrobat you need the form tool. If the form tool is not available under the tools panel, use View->Tools->Forms menu item to make it appear.

  • How to execute preflight profile using Acrobat Javascript

    Execute a pre-flight profile using acrobat javascript and  call that function in VB.Net.

    See: http://help.adobe.com/livedocs/acrobat_sdk/10/Acrobat10_HTMLHelp/wwhelp/wwhimpl/common/htm l/wwhelp.htm?context=Acrobat10…

  • Read xml file using Acrobat javascript

    Please let me know if a XML file can be read using Acrobat javascript.
    I need to read and store the xml data in a string.
    thanks,
    Sashi

    STEP - 2
    SQL>
    SQL> DECLARE
      2    l_ctx dbms_xmlsave.ctxType ;
      3    l_xml CLOB :=
      4  '<?xml version="1.0" encoding="UTF-8" ?>
      5  <NewDataSet>
      6      <ROW>
      7          <DEPARTMENT>BA52</DEPARTMENT>
      8          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
      9          <LOCATION>Australia</LOCATION>
    10          <MAY_2006>21668</MAY_2006>
    11      </ROW>
    12      <ROW>
    13          <DEPARTMENT>BA501</DEPARTMENT>
    14          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
    15          <LOCATION>China</LOCATION>
    16          <MAY_2006>8166</MAY_2006>
    17      </ROW>
    18      <ROW>
    19          <DEPARTMENT>BA522</DEPARTMENT>
    20          <PCS_CONTRACT_TAG>MD-3GSM</PCS_CONTRACT_TAG>
    21          <LOCATION>Australia</LOCATION>
    22          <MAY_2006>21668</MAY_2006>
    23      </ROW>
    24  </NewDataSet>' ;
    25  BEGIN
    26      l_ctx := dbms_xmlsave.newContext(targetTable => 'XML_INSERT');
    27      dbms_output.put_line(dbms_xmlsave.insertXML(ctxHdl => l_ctx,
    28                                                  xDoc   => l_xml) ||
    29                           ' rows inserted.');
    30      dbms_xmlsave.closeContext(l_ctx);
    31  END;
    32  /
    3 rows inserted.
    PL/SQL procedure successfully completed.Regards.
    Satyaki De.

  • Error opening PDF files using Acrobat Reader 9

    I use Acrobat Reader 9 to view PDF files. I have Windows XP operating system on my machine.
    In order to view encrypted PDF files on our company webiste we have to install FileOpenInstaller.exe or FIleOpenInstaller.msi which is Adobe Component
    Therewas no issue viewing/accessing the PDF files until last week. But now we get below error when we try to open encrypted PDF files from our company website.
    The error message is "Unable to get server data [FO error #2114, OS error #0)
    Any idea what could be the cause of error?
    Is anyone aware of any possible issue with Adobe FileOpenInstaller.exe or FIleOpenINstaler.msi packages

    I have just installed Adobe Reader 9. I am getting frequent system hangs (cannot do anything without cold re-boot) when using the product, in particular when using forms documents provided by Companies House, a UK government agency.

  • How to search a word in PDF using acrobat javascript?

    Hi,
    I need to find a word in acrobat PDF using javascript. I used
    find text("abx");
    select text("abx");
    This doesn't work for me..
    Someone guide me.
    Thanks in advance,
    Poovili V

    I used
    find text("abx");
    select text("abx");
    This doesn't work for me..
    That is not Acrobat Javascript. In the Acrobat Javascript Reference look for the method getPageNthWord.

  • "Unable to Open" PDF attachment using BlackBerry PlayBook when message is received from Exchange 03

    Hello,
    Recently I have found that some users are having an issue with opening PDF attachments on the BlackBerry PlayBook using their Exchange 2003 accounts.
    I have isolated the issued to only users on Exchange 2003 using activesync.
    To resolve/workaround you can select and hold the attachment until you have the option to "Open" or "Save As". Select "Save As" and rename the attachment to the same name but include .pdf at the end of the file name. This allow the attachment to open in Adobe and show the PDF document in the email message correctly.
    Messages where being recieved as .null attachments with same file name but no extension.
    Hope this helps anyone.

    Use this FM  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = DOC_CHNG
    importing
       sent_to_all                = sent_to_all
        TABLES
          PACKING_LIST               = OBJPACK
          OBJECT_HEADER              = OBJHEAD
          CONTENTS_BIN               = OBJBIN
         CONTENTS_TXT               = OBJTXT
          RECEIVERS                  = RECLIST
        EXCEPTIONS
          TOO_MANY_RECEIVERS         = 1
          DOCUMENT_NOT_SENT          = 2
          OPERATION_NO_AUTHORIZATION = 4
          OTHERS                     = 99.

  • Can I add encryption security using Acrobat 9 Pro?

    Hi,
    I need to create a pdf with an ecryption security, this pdf will be emailed and the encryption must restrict the "editing changes allowed" but it should allow the recipient to print the pdf.
    I heard this can be done using Adobe Acrobat X Pro, I don't have this one installed, I have Adobe Acrobat 9 Pro, is it possible to use this type of Acrobat for this type of encription?
    Thanks

    It is possible with Acrobat 9.

  • Photoshop 7.0.1 will not open .pdf made using Acrobat 9 Pro

    Hi:<br /><br />Acrobat 9 Pro can read a .dwg file made by Autocad and turn it into a .pdf.  There are three choices for the pdf standard: none, PDF/A-1b:2005 or PDF/E-1.  I tried all three and in all cases Photoshop 7 complains with:<br /><br />Could not open <file> because it is not the right kind of document.<br /><br />Is there some trick to getting this to work?<br /><br />Have Fun,<br /><br />Brooke Clarke

    Hi Chris:
    ------SOLVED-----
    Sorry, it's my (human) memory. Need to use the Export method of saving the Acrobat as an image.
    Have Fun,
    Brooke Clarke

  • How to disable - General preference - Create links from URLs. Using Acrobat Javascript

    http:\\www.sdss.com should not be suggested as a link. We have manual option to uncheck -> Create links from URLs, but I need to achieve this through the script.
    Please help on this ASAP.

    That is an end user preference only. Not accessible by JavaScript. If you control the installation, then you can turn off that option for the installation but the user could still turn it back on.

  • Error opening DRM PDF document using Acrobat Reader

    I am having problem opening a DRM PDF document using Acrobat Reader. When I open the document I get a message if I want want to connect to xx.xxxxx.xx server (Allow / Disallow), I click Allow then I get this error message without prompting me for the login box.
    "An error occurred while performing this operation. Contact an administrator if this problem continues."
    What is strange is that when I open the document using Acrobat Professional then there is no error and I get login box.
    I tried this in Acrobat 8 and 9 Reader with latest updates.
    Please help.

    The problem is the enhanced security, turned on by default, in Adobe 8.2 and 9.3 - specifically restrictions on cross domain scripting.  
    You need to install a crossdomain.xml file in the root of your application server.
    See the Enhanced Security and Troubleshooting Guide and FAQ: http://learn.adobe.com/wiki/download/.../Enhanced_security_faq.pdf
    And the Cross Domain Policy File Specification: http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html

  • How to write text file in acrobat javascript

    Hi,
    I need to write a txt file from acrobat javascript. How can i do this?
    My requirement is to get identity mail id and name? Using acrobat javascript i can able to take mail id as identity.email. I get the mail id as alert and in console
    How can i write this mail id to text file?
    Thanks in advance...

    Hi,
    here is a commented program stanza
    var v = this.getField("myTextField").value;
    // Get the contents of the file attachment with the name "MyNotes.txt"
    var oFile = this.getDataObjectContents("MyNotes.txt");
    // Convert the returned stream to a string
    var cFile = util.stringFromStream(oFile, "utf-8");
    // Append new data at the end of the string
    cFile += "\r\n" + v;
    // Convert back to a stream
    oFile = util.streamFromString( cFile, "utf-8");
    // Overwrite the old attachment
    this.setDataObjectContents("MyNotes.txt", oFile);
    // Read the contents of the file attachment to a multiline text field
    var oFile = this.getDataObjectContents("MyNotes.txt");
    var cFile = util.stringFromStream(oFile, "utf-8");
    this.getField("myTextField").value = cFile;
    [signature deleted by host]

  • Opening Encrypted/Certificate Secured PDF.

    Hello,
    I have a pdf encrypted using certificate. I want to open this pdf using Acrobat sdk APIs. I have read the documentation of "Opening secured Pdf". I learnt that AVDocOpen() function calls Acrobat built in authorization procedure and using PD layer to open a encrypted pdf we need to write our own authorozation procedure. I want some example which demostrates how encrypted pdf are opened. Also, when opening certificate secured pdf, where does Acrobat installs the certificate?
    Please can someone guide me!!
    Thanks in advance.

    Yes, you can read XMP w/o opening the PDF – of course, that assumes that the XMP is not encrypted (it's a choice of the PDF authoring/encrypting tool).
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 16 Jan 2012 21:10:56 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Opening Encrypted/Certificate Secured PDF.
    Re: Opening Encrypted/Certificate Secured PDF.
    created by poortip87<http://forums.adobe.com/people/poortip87> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4145422#4145422

Maybe you are looking for

  • BW Report Availability

    As much as we would like all BW based reports available on time, all of the time, the reality is that some reports are not available to our user community due to data load failures e.g. master data, issues that require bug fixes etc .. Our business n

  • How to look for my ipod using the serial number

    Looking for my stolen ipod using my serial number. Where do I go to do this?

  • How can I create a custom formula that checks if a PC file exists? (CR10)

    Post Author: lgayosso CA Forum: Formula Hello, I need to create a formula that validates whether a PC file exists or not to display a message ('File Found' or 'File not found'). I created a custom formula that displays the appropriate message based o

  • Suggestions for Oracle ADF learners

    Hi ADF experts, Some one suggest,For Oracle ADF learners must having java knowledge ? I am new to JAVA & ADF. But I want to learn Oracle ADF. Is java skills must to learn Oracle ADF. I am Oracle BPM11g developer.So for Oracle BPM11g,Oracle ADF is fro

  • After system date/time reset macbook pro can't open any programs and access system preferences

    Hi, Booted my macbook pro 2009 and the time was reset to 2001, a prompt asked me to change settings or else the computer might function erratically. So i changed the date and time settings as suggested but then suddenly it stopped working. I restarte