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

Similar Messages

  • 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

  • How to save and download json to make use of a app in offline mode

    how to download and save a json file from url to make use of a app in offline mode and if internet is available it should take data from url only and display it in tableview..but  for the second time it should make use of the saved json data to display the table view data in app.

    Hi,
    Using F calls a routine and not BAdI.
    If record will directly be created then there is no need to write Z program and calling it using F indicator. However, in case there is some logic which can not be written directly in the Dynamic Action then you need to write that logic in a routine and call it using F indicator.
    VK

  • How do I change backgrounds in my PDF using Acrobat X?

    I have been wholly unsuccesful in changing my PDF background of certain documents.  It works for some, but not other documents.  Is there an easy explanation for this?  Here is the link to the PDF document I'm having trouble with:  http://www.geoffhayden.com/assets/eus.pdf
    I am unable to change its background to any other color.  Thoughts?
    I am using Adobe Acrobat X (10.1.2) on a Mac. 
    Geoff

    Daniel makes a valid point but that's not really what you asked for so here is one way to achieve the result you want.
    What was "probably" done was to use Acrobat's Edit Object Tool.  This feature relies on you to have a couple of different types of graphic editing tools like Photoshop and Illustrator.  In this case Adobe Illustrator will open if you have it installed and selected as the editing application in the Edit Object Tool's preference.
    The steps would be:
    1.  Go to the page where you want to change the background.
    2.  Select the Edit Object Tool
    3.  Control+click the page and select "Edit Page..." from the context menu.
    4.  In Adobe Illustrator, select "Layers" from the "Expanded Panels" on the right hand side.
    5.  In the Layers panel, expand Layer 1
    6.  In the Layer 1 expand the top <Group>
    7.  Go to the bottom two items in that <Group> and select both items (Shift+click) named <Path>
    8.  Select the "Trashcan" icon at the bottom of the "Layers" panel.
    9.  The result should look something like this:
    10.  In Adobe Illustrator go to File>Save
    11.  Close the file
    12. It should show up like you expect now on that page.
    13. Repeat as necessary.
    14.  Done

  • How can I export from Excel to pdf using Acrobat Std to achieve uniform page size throughout the whole pdf document?

    After exporting the whole workbook to a single pdf file, page sizes are inconsistent. When viewing the document in full screen, some pages show up as 25% zoomed, others as 34%.  I could re-print the exported pdf file to pdf in Acrobat Std, and that way I could get the same page size throughout the document, but then I loose my bookmarks, which I don't want.
    I have already set the page size to A4 in Excel, but that's not where my problem lies. any help, hint is appreciated.

    A good place to start is Karl Heinz Kremer's blog, where he has a few examples:
    http://khkonsulting.com/2010/09/reading-pdf-form-fields-with-vba/

  • How to get CMYK values in a PDF using Acrobat Professional

    Hi,
    Anybody can help me?
    How to get the CMYK values in a PDF file using Acrobat Professional?
    Thanks for looking into this!
    Regards,
    Sudhakar

    Select employee_id, max(address), max(phone), max(email)
    from emp
    group by employee_id;Max

  • How to 'save a copy' of a pdf?

    I am trying to change the security of the pdf  in which 'extend features in adobe reader' option is enabled. To change this i have to save a copy of a pdf.
    How to save a copy of a pdf  using acrobat sdk or javascript or batch processing?
    I have tried saveAs method in javascript but it doesnt work.
    Please Advice.

    Im trying to save the document in a location, but it is giving me a "Error 3: Bad parameter".
    Here is my code.
    DURING
              ASFileSysReleasePath(fileSys,pathName);
              ASPathName newPathName = ASFileSysCreatePathName(fileSys, ASAtomFromString("D:\\newPdf.pdf"),NULL,NULL);
              PDDocSave(pdDocForExp, PDSaveFull | PDSaveCopy, newPathName,fileSys, NULL, NULL);
              PDDocClose(pdDocForExp);
    HANDLER
               char  buf[256], errmsg[256];
                sprintf(buf,  "Error %d: %s", ErrGetCode(ERRORCODE),      
                ASGetErrorString( ERRORCODE, errmsg,  sizeof (errmsg) ) );
                AVAlertNote(buf);
    END_HANDLER

  • With 1.1.1 update on Sep 2, excel opens and then closes immediately.  same with word and powerpoint

    with the 1.1.1 update of MS Word, Excel and Powerpoint for the iPad on Sep 2, all of the three open when selected and then close immediately.  Using iPad Air

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430
    iOS 7: Help with how to fix a crashing app on iPhone, iPad (Mini), and iPod Touch
    http://teachmeios.com/help-with-how-to-fix-a-crashing-app-on-iphone-ipad-mini-an d-ipod-touch/
    Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/TS1702
    Delete the app and redownload.
    Downloading Past Purchases from the iTunes Store, App Store and iBooks Store
    http://support.apple.com/kb/ht2519
     Cheers, Tom 

  • I am on a Windows 7 OS attempting to reduce pdf size with my Adobe Acrobat Standard XI & Pro.  The application keeps timing out and  at the Subsetting embedded fonts portion and the application gives "Adobe Acrobat has stopped working" and then closes.  T

    I am on a Windows 7 OS attempting to reduce pdf size with my Adobe Acrobat Standard XI & Pro.  The application keeps timing out and  at the Subsetting embedded fonts portion and the application gives "Adobe Acrobat has stopped working" and then closes.  The document is 275 pages.  Is there something I can do to stop this?

    Hi Ricci,
    Since when are you facing this issue? Did you tried system restore to a date before this problem occured.
    Does acrobat stop working when you open this specific pdf file or with any pdf file that you open?
    Regards,
    Rahul

  • 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 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

  • 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!

  • 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

  • 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 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

  • Days of a month using Calender

    Hi, I have a requirement to get number of days for a month for the input of month and year. Please anyone help me to know whether any API is available in java? (Can we use Calender/Date?) -V

  • How to generate sitemap for SiteStudio sites. Is   there any component avai

    How to generate sitemap for SiteStudio sites. Is there any component available? We want to create xml having list of all site URLS for SEO purpose. Is there any way to achieve this ? Thanks

  • How should schema look like for

    hello, we get the following xml-file: <?xml version="1.0" encoding="ISO-8859-1"?> <TELEFONBUCH xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.oracle.com/xdb/tel.xsd"> <GRUPPE> <ID>A134535</ID> <NAME>Fe

  • Why is Preview PDF greyed out only HTML available?

    I can't seem to find how to change settings so I can change the preview option to PDF, can anyone help please?

  • [solved] All menu items lost from LXDE menus

    I had problems with loading a USB flash drive, and music cd, and then X windows locked up completely, which led me to deinstall LXDE as well as the applications in an effort to get X windows working.  It turned out that all that was wrong was that db