How to save and then close document Using Acrobat 9 (URGENT)

I have been looking for a soultion for long time now but
couldn't find any.
I'm using a dynamic PDF form desgined using LC Desginer and created a button that should save the current opened form in the same location (no need to define the location because what I want to use is the command File -> Save) and then close the application (I'm using Acrobat 9 Pro Extended).
I tried many scripts and gone throw JavaScript™ for Acrobat® API Reference but no luck.
Once I click on the button I get the following error: NotAllowedError: Security settings prevent access to this property or method.
Will you please help in this issue as it took long time and my project manager is pushing to get resolved ASAP.
Guys, I'm new to this kind of tecnology so please be patient with me.
Thanks in advance for your valuable help.
The code I used in click event of the button is as follow:
try{
     var myDoc = app.newDoc();
     myDoc.saveAs();
     myDoc.closeDoc(true);
catch (e)
     xfa.host.messageBox(""+e);
I used this earlier and got the same error:
try{
      var myDoc = event.target;
     myDoc.saveAs();
catch (e)
     xfa.host.messageBox(""+e);

Hi Niall,
function(){return A.apply(null,[this].concat($A(arguments)))}
function(){return A.apply(null,[this].concat($A(arguments)))} 
The app.execMenuItem works here. Is your form designed to be opened in Acrobat/Reader or are you opening the form in html?
The form will be opened by Acrobat/Reader. The statement worked but what I need is to save the PDF in the current location without popping up the Save As dialog box. In other words I would like to perform Ctrl+Saction and then exit the application not only close the form because the Content Management Solution we are using will require the application to be closed so it can CheckIn the document.
I tried to use app.execMenuItem("Save");  but it seems it is not working because once I try to close the application or the form using app.execMenuItem("Close"); the do you want to save changes to "FORM" before closing? dialog box pops-up.
For closing the application I tried app.execMenuItem("Exit"); and I got this error: InvalidArgsError: Invalid arguments.
function(){return A.apply(null,[this].concat($A(arguments)))}
function(){return A.apply(null,[this].concat($A(arguments)))}Also you may want to consider how you are reader enabling the form. If you are using Acrobat to extend the form, then certain features like database connections will not work.
The customer has Adobe LC Reader Extension so I will use it to extend the PDF but right now I do use Acrobat so I don't need to extend the PDF everytime I need to test it.
Can I get all the arguments that execMenuItem uses?
I really appreciate your help Niall.
PS: I couldn't reply earlier yesterday because my work is on the server and I was at home (my time is +3 GMT it was night when I got your reply)
Regards
Mazen

Similar Messages

  • How to save and then close a PDF Using Acrobat 9 (URGENT)

    I have been looking for a soultion for long time now but
    couldn't find any.
    I'm using a dynamic PDF form desgined using LC Desginer and created a button that should save the current opened form in the same location (no need to define the location because what I want to use is the command File -> Save) and then close the application (I'm using Acrobat 9 Pro Extended).
    I tried many scripts and gone throw JavaScript™ for Acrobat® API Reference but no luck.
    Once I click on the button I get the following error: NotAllowedError: Security settings prevent access to this property or method.
    Will you please help in this issue as it took long time and my project manager is pushing to get resolved ASAP.
    Guys, I'm new to this kind of tecnology so please be patient with me.
    Thanks in advance for your valuable help.
    The code I used in click event of the button is as follow:
         var myDoc = app.newDoc();
         myDoc.saveAs();
         myDoc.closeDoc(true);
    catch (e)
         xfa.host.messageBox(""+e);
    I used this earlier and got the same error:
    try{
          var myDoc = event.target;
         myDoc.saveAs();
    catch (e)
         xfa.host.messageBox(""+e);
    try{

    Hi Niall,
    function(){return A.apply(null,[this].concat($A(arguments)))}
    function(){return A.apply(null,[this].concat($A(arguments)))} 
    The app.execMenuItem works here. Is your form designed to be opened in Acrobat/Reader or are you opening the form in html?
    The form will be opened by Acrobat/Reader. The statement worked but what I need is to save the PDF in the current location without popping up the Save As dialog box. In other words I would like to perform Ctrl+Saction and then exit the application not only close the form because the Content Management Solution we are using will require the application to be closed so it can CheckIn the document.
    I tried to use app.execMenuItem("Save");  but it seems it is not working because once I try to close the application or the form using app.execMenuItem("Close"); the do you want to save changes to "FORM" before closing? dialog box pops-up.
    For closing the application I tried app.execMenuItem("Exit"); and I got this error: InvalidArgsError: Invalid arguments.
    function(){return A.apply(null,[this].concat($A(arguments)))}
    function(){return A.apply(null,[this].concat($A(arguments)))}Also you may want to consider how you are reader enabling the form. If you are using Acrobat to extend the form, then certain features like database connections will not work.
    The customer has Adobe LC Reader Extension so I will use it to extend the PDF but right now I do use Acrobat so I don't need to extend the PDF everytime I need to test it.
    Can I get all the arguments that execMenuItem uses?
    I really appreciate your help Niall.
    PS: I couldn't reply earlier yesterday because my work is on the server and I was at home (my time is +3 GMT it was night when I got your reply)
    Regards
    Mazen

  • Bug Report: [VIsio 2010] whenever I try to save a diagram to JPEG and then close Visio using the X button, Visio hangs

    Greetings
    I use Visio 2010 in windows 7 64bit
    and I have this problem:
     whenever I try to save a diagram to JPEG (save as>JPEG) and then close Visio using the X button on the upper right corner, then Visio hangs.
    The jpeg pic is saved ok, but Visio hangs permanently: I have to close it using task manager.
    On the other hand, if after I save into jpeg, I press whatever other button in Visio (from ribbon) then it works ok, and afterwards I can close Visio with the X button
    - but, if I try to close Visio with the X button  right after saving to JPEG, Visio will surely hang.
    Thank you
    PS. Visio 2010 is fully updated (File>Help reports:
    Visio 2010 Premium (v14.0.6111.5000) SP1 MSO (14.0.6112.5000) 32bit)

    Update:
    The problem reappeared/wasn't completely solved:
    So, I also went to Control Panel>add/remove programs, rightclick on Adobe Acrobat X> change installation and untick the PDFMaker item, in order to uninstall it:
    that's because initially, even after I had unticked "PDFMaker for Visio AddIn" in COM Add-Ins,
    in File>Options>Add-Ins tab, on the Active Application Add-Ins part (yes, on ACTIVE Add-Ins)
    I was still seeing about 5-6 lines, all having items containing PDFMaker for Visio AddIn" [PDFMVisio.vsl].
    In other words, the PDFMVisio.vsl file was loaded even if unticked!!
    Then, after uninstalling the add-in, the problem was finally fixed at last!
    Thank you so much for this additional information!  I was having the same problem.  I did what you instructed, and the problem has now disappeared!

  • Acrobat reader installed fine, but opens for five seconds and then closes. Using Windows 7 and mcafe

    Acrobat reader installed fine, but opens for five seconds and then closes. Using Windows 7 and McAfee on a Dell laptop.

    You can try using Windows Explorer to navigate to C:\Program Files (x86)\Adobe\Reader 11.0\Reader, then double-click on Eula.exe and accept the license agreement

  • Crocodoc HTML5 document viewer:Upload and then display document

    Dear all,
    Did anyone try to upload and then display documents using HTML5 technology. Also recently i came across SAP is using Crocodoc,"an HTML5 documents to display their presentations". I welcome all of your thoughts and suggestions.
    Regards
    Prabaharan

    I have the same need as vudean. I don't understand the security issue. If I type a document using Pages or whatever, why can't I upload the document to a web site? I think Apple should make the standard web "file upload control" available to iPad users.
    I understand that there should be some limitations, but it should be possible to upload standard user files. I can upload them to Dropbox, so I don't se the big difference.
    Does Apple read this? If not, where can I propose this feature to them?

  • How come everytime i add an image to my pages document the screen goes blank and then closes the app?

    How come everytime i add an image to my pages document the screen goes blank and then closes the app?

    Hi Fayed11,
    Welcome to Apple Support Communities.
    You may find this article useful for troubleshooting any apps on your iPad that aren't behaving as expected:
    iOS: Troubleshooting applications purchased from the App Store
    http://support.apple.com/kb/ts1702
    Have a great day,
    Jeremy

  • How can i open the directory/​folder and read all the files inside it in order and then close it?

    How can i open the directory/folder and read all the files inside it in order and then close it? any example would be nice.
    thanks

    In the File I/O>>Advanced File Functions Palette is a function named "List directory". This function will give you two arrays. One contains the names of all subdirectories the other the names of all files. If you want to sort them by name use the array sort function. If you want to sort them by another attribute use the File/Directory Info function to get more data. Use a cluster which contains the attribut to sort and the original index of the name. Then sort this array.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • HT201407 iTunes on my phone will come up and then close, how do I fix it?

    iTunes on my phone will come up and then close, how do I fix it?

    Hello Bull Powell,
    Thank you for using Apple Support Communities.
    It sounds like your iPhone appears in iTunes for a split second, and then disappears.
    I would suggest the troubleshooting outlined in this Troubleshooting Assistant named:
    iPhone not appearing in iTunes
    http://www.apple.com/support/iphone/assistant/itunes/
    I suggest restarting the iPad with step 2 and work your way down from there.
    Restart iPhone
    To restart iPhone, first turn iPhone off by pressing and holding the Sleep/Wake button until a red slider appears. Slide your finger across the slider and iPhone will turn off after a few moments.
    Next, turn iPhone on by pressing and holding the Sleep/Wake button until the Apple logo appears.
    Is iPhone not responding? To reset iPhone, press and hold the Sleep/Wake button and the Home button at the same time for at least 10 seconds, until the Apple logo appears.
    If your device does not turn on or displays a red battery icon, try recharging next.
    Regards,
    Sterling

  • I am having to run v3.5.10 because even now with latest 3.6 that version - every 30 seconds or so I hear a process open and then close. Can't track it down even in task manager - too brief but it's insistent! So stuck having to use 3.5

    I have to use V3.5.10 despite wanting to run 3.6 (just updated to 3.6.6 too). However when I run 3.6 I hear thru my sounds set up a process open briefly and then close every 30 seconds or so - it's very regular and insistent and I'd like to know what it is and why. It's too brief to spot in Task manager processes listing. This did happen once under 3.5 I seem to recall but was cured when it upgraded.
    == This happened ==
    Every time Firefox opened
    == Pretty much soon after I first applied and ran 3.6

    My Win sounds give me a sound each time an app or process opens and another when it closes - thus I know from that any time something happens.
    I have 3.6.6 on as well as 3.5.10 - so can run either. But running .3.6.6 despite being update still has this odd process open and close every half minute.

  • I have downloaded and installed the latest version of numbers on my mac. Everytime I save and then try to reopen that document, I receive a message telling me that I need a new version of numbers. Also, when I try to sort the date column, it sorts out of

    I have downloaded and installed the latest version of numbers on my mac. Everytime I save and then try to reopen that document, I receive a message telling me that I need a new version of numbers. Also, when I try to sort the date column, it sorts out of order. The last version sorted fine.

    Welcome to Apple Support Communities
    When you install the new iWork version, the old iWork version is kept, so it looks like you are opening your old version.
    To fix this, open a Finder window, choose Applications in the sidebar and drag the new Numbers version to the Dock, so you can access to it quickly. Open all documents from this version. I don't recommend you to delete the old Numbers version in case you need it.
    Respecting to the second question, you will get better answers in the Numbers for OS X forum

  • My iphoto quites unexpectedly everytime I open it and says closes while using the eOkaoFr.dylib plugin. Does anyone know how to fix this? iphoto won't stay open for more than 1 minute at a time.

    My iphoto quites unexpectedly everytime I open it and says closes while using the eOkaoFr.dylib plugin. Does anyone know how to fix this? iphoto won't stay open for more than 1 minute at a time. Help anyone?

    Is there a crash log? If so post the first 100 or so lines o fit
    Do you know what the ofending plugin is? and where it came from?
    LN

  • I have Pandora and Slacker Radio apps installed on my ipod touch. When I touch the icon to play it, it opens for a second and then closes. Does anyone know how to fix this??

    I have Pandora and Slacker Radio installed on my ipod touch. When I touch the icon to open these, it opens for a second and then closes. Does anyone know how to fix this?

    - Try a reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Purchase/install any new app
    - The remaining items of:
    iOS: Troubleshooting applications purchased from the App Store

  • How to read and then extract HTMl source code using java program?

    Hi,
    Could someone tell me how to read and then extract the content of certain tag from html source code. For example, given url http://.... , I would like to know what the <Title> content <Title> in that page is.
    Any help is greatly appreciate.

    Use a URLConnection to make the connection to the page at the needed URL. From the URLConnection, you can get an InputStream that is the stream of data from that page. Just search through the stream and find the <title> tags (don't forget to check for case sensitivity).

  • Every time I close my Macbook Air and then go to use it again. My wifi is not connected, I have to go to the network diagnostics and basically find my network and reconnect every time. Is there anything I can do to fix this?

    Every time I close my Macbook Air and then go to use it again. My wifi is not connected, I have to go to the network diagnostics and basically find my network and reconnect every time. Is there anything I can do to fix this?

    worksafe's link with the KeyChain fix is good.
    This usually happens when KeyChain has two entries for the same WiFi network.
    If repair did not work you can follow the manual steps:
    Disconnect WiFi
    Open KeyChain from Applications / Utilities and find your WiFi network entry(ies) and delete all of them.
    Connect to your WiFi again.

  • How to SaveAS and SaveAs on different volume in TextEdit?

    i am having a bit of a battle with the new features for saving in Lion and while i /sort/ of get it i am not doing very well in TextEdit. wondering if someone wouldn't mind helping me out.
    i have created a new document and upon running the first Save (i think) i was giving an opportunity to put this document somewhere and to NAME it.
    NOW i would like to run a SaveAs so i can KEEP THE ORIGINAL but also edit a new version. I would also like to SAVE A BACKUP on my LAPTOP.
    in the past to do this i have run a SaveAs, edited and this new document (it was renamed in the SaveAs) and then i have re-opened the older document in order to continue editing it. alternatively, i have sometime COPIED and PASTED the contents of the existing doc into a NEW document and then Saved and named this document.
    1. How do i do this in TextEdit now? I see a Save Version (not applicable) and a Duplicate (doesn't /seem/ to do what i need since it automatically names this document with the same name and an appended "copy").
    2. I want to SAVE A COPY of my document on an external volume (my laptop). i see a "Export PDF" and again i see the Duplicate option but for some reason i don't see my laptop as a DESTINATION for either of these even though it appears to be mounted (little cutout people icon on the desktop).
    what am i missing here?

    thanks charlie.
    sort of a new world over here. newish mac user to boot. sort of interesting to go back and forth between my "old way" with photoshop products and then dive into a mac lion product and do this.
    in any event - i am /not/ seeing my /external/ volume when i try to save a duplicate or export a pdf.
    any idea (short of a bug) on why i am not seeing the Laptop as a shared location since it is mounted? this means i have to save to the macpro and then manually move it to the MBP.
    also, i guess export to PDF is the only option since if i am saving a txt i would use Duplicate...?

Maybe you are looking for

  • HP COMPAQ CQ42 258VX Display problem

    Model type : CQ42 258VX PROC : INTEL i5 - 450 2.4Ghz RAM : 2GB DDR3 HDD : 500GB VGA GRAPHICS : ATI Mobility radeon HD5430 - 512MB I have a Compaq notebook CQ42-258VX, recently i must format and reinstall with windows 7 32 bit. The following issues oc

  • Custom Webservice WSDL error

    Hi, No WSDL document available for publishing error is displaying while accessing our custom web service. Could any one please suggest me in right way to resolve this error. Thanks in advance

  • Flash CS4 installer file name?

    I need to reinstall Flash CS4 because I somehow broke the CS4 version of Bridge last week. I *know* I've got the installer somewhere on my hard drive but have been unsuccessful in locating it. Can someone give me a hint as to the installer name? I've

  • Oracle VM with 11g R1

    Hello all, I just want to know where can i find information Step by Step how to install Oracle VM and and run it with an oracle DB inside the OS in the VM.. so i can connect from another PC to that VM... Thx for your help

  • Set No Decimal Point for Quantity in Any Stock Movement.

    Hi experts, Can anybody tell me how to block user from entering qty with decimal point in any stock movement that they plan to do. Our current system setting allowed user to do goods issue with decimal quantity such as 1.25 Unit. Regards.