How to check if document is still open

I have the following problem with Adobe Acrobat Standard 9:
I have a Java Applet that uses Adobe Acrobat to present documents to the user. The user is able to edit and save the document. When the user closes the document the document is stored in a database and therefore I somehow have to listen for when the document is closed to determine when to save the docuent in the database.
The "listener" is implemented in a thread that executes every 500 ms. I use a product called Java2COM (NevaObject Technology) to communicate with the Adobe Object-model in Windows. The code to determine if the document is still open has this implementation:
private boolean isValid() {
     synchronized (READ) {
          if (mDoc == 0) { //mDoc is the document registered in the COMIGlobalInterfaceTable
               return false;
     boolean valid = false;
     COMIDispatch document = new COMIDispatch();
     COMDispParams params = null;
     COMVariant ans = null;
     try {
          COMIGlobalInterfaceTable.GetInterface(mDoc, document);
          params = new COMDispParams();
          ans = new COMVariant();
          COMExcepInfo exc = new COMExcepInfo();
          document.Invoke("IsValid",
               COMIDispatch.LOCALE_SYSTEM_DEFAULT,
               COMIDispatch.DISPATCH_METHOD,
               params, ans, exc);
          valid = ans.asBoolean();
          } catch (COMException e) {
               valid = !COM.isComAppAvslutad(e.hresult().getValue());
          } finally {
               clear(params);
               clear(ans);
               release(document);
          return valid;
A big part of the problem is that I have not managed to reproduce the problem in test mode... the problem occurs (so far) only in production mode.
Most part of the code above is Java2COM-specific so my main question is this: Is using the method 'IsValid' in Acrobat's COM/OLE-api the correct way to check if a document is open/showed in Adobe Acrobat?

Yes, but my problem is that I don't know at what point the user closes the document. For example:
The user creates a new document (pdf) in my Java Applet.
The Java Applet launches Acrobat Standard which presents a document to the user.
The user edits the document, saves and then closes the document.
The document is now to be stored in a document database... and therefore I have to somehow "listen" for when the document has been closed, I can't store it in the database before it has been properly closed.
So what I do (or try to do) is ask Acrobat Standard if the document is still open in Acrobat Standard by calling its method IsValid in the COM-api. This is done in a thread that executes every 500 ms.
There may be better ways to achieve this so any suggestion is appreciated.

Similar Messages

  • How to check A document library that has document publishing enabled and content approval

    HI
    1) how to check A document library that has document publishing enabled
    2)A document library or a list that has content approval enabled
    adil

    For both question, check version settings of that library
    >>1)Document Version History "Create
    a version each time you edit a file in this document library?" should set to either create major versions or Create
    major and minor (draft) versions.
    http://office.microsoft.com/en-us/sharepoint-server-help/publish-or-unpublish-a-version-of-a-file-HA101862529.aspx
    >>2)Content Approval  "Require
    content approval for submitted items?" should be set to Yes
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Does anyone know how to see what apps are still open on lion? On snow leopard you just had to slide three fingers side ways I believe thanks

    Anyone know how to see what apps are still open on lion?

    If you do not have the light in dock active, activate it, or slide three finger up to open Mission Control or in Force qQuit all  open programs are listed (even the hidden ones).
    Hope that helps..

  • Delivery document is still open even already invoiced

    Good day! Could anyone help me on this?
    Here is the scenario:
    A new delivery document was created based in sales order. The delivery undergoes to approval procedure and then approved.
    Upon posting of the delivery doc and after past few days, sales return was requested. So, sales return was processed and successfully posted based in that delivery doc, but later that day another sales return was requested and did same procedure (successful).
    Two sales return was created based in that delivery doc and both SR were 'closed' while the delivery doc is still open, now to close that DR an invoice doc is required. Invoice was made base again in that DR and successfully posted. Expectedly, the DR should close but apparently it doesn't close. Why is that? Or did I miss something that would close that DR?
    Thanks in advance!

    Hi Nagesh,
    Yes your right, all marketing docs undergone with approval procedure are all saved as Draft until it was approved by the approver and then posted by the originator and that is the only time DR or any marketing docs should be called as official/posted transaction.
    Going back to my scenario, what I mentioned was approved and posted meaning the transaction was officially saved and undergone with the normal module flow SO->DR->SR->SI.
    And my concern was focused on why DR is still open even already invoiced.
    Correct me if I'm wrong, DR will still remain 'Open' only if the item total qty was not yet invoiced. For example:
    DR1              QTY            Amount
    Item 1             10              100
    SI
    Item 1              8                80
    Thanks,
    Rhod

  • How to check if a file is open

    I have a file (Test.doc) that is currently opened in my WindowsXP OS.
    How can I check from my java code if the file is opened or not? Is there any posibility?

    http://forum.java.sun.com/thread.jspa?threadID=5197544&messageID=9781245

  • How to check if export is still running

    Hello,
    I am using Oracle 9.2.0.4.0 on unix(AIX 4.3)
    I am running an export of a table that has 1000838 rows and it started about 5 hours back, and now I do see a .dmp file but the export log in still not complete.
    It still says exporting table ...........
    Now, my question is how can I verify if this export is still running or if the export is done but just the log in incomplete ??
    Thanks

    You can check it so:
    SIGEP2_PROD>r
      1* select username, program from v$session
    USERNAME                       PROGRAM
                                   ORACLE.EXE
                                   ORACLE.EXE
                                   ORACLE.EXE
                                   ORACLE.EXE
                                   ORACLE.EXE
                                   ORACLE.EXE
                                   ORACLE.EXE
    SYS                            sqlplusw.exe
    MIC1_001                       sqlplus.exe
    DATA_ENTRY_P                   EXP.EXE
    10 rows selected.
    SIGEP2_PROD>
    DATA_ENTRY_P EXP.EXE
    Joel Pérez
    http://otn.oracle.com/experts

  • How to check in document in default storage when using CV01N?

    Hi community!
    I was in the process of configuring content server for an ECC 6.0.
    I had installed the content server version 4.6 in a separate system and its working well.
    Then i finished all the configurations relating to creation of repository and linking it to content server through CSADMIN. I am setting in DC10 use KPRO. In transaction spro  Cross-Application Components --> Document Management --> General Data --> Define Profile. I am  create a profile, which can be assigned either to a role. Under "Determine definitions for applications" i am define a storage category to a workstation-application. However, when I go to CV01N, and try to check in a new document i did not even get the drop down list instead of my default value. Saves if I manually select "Check In". Am I missing a step??
    Edited by: Igor Polushkin on Apr 15, 2010 1:55 PM

    Hi Igor,
    If there is no profile based on user-id then it calls FM SUSR_USER_AGR_ACTIVITYGR_GET to check if there are any roles existing with the user-id assigned to it. For example: it returns one role.
    Now if this role is assigned to two different profiles, then the system picks anyone profile and accordingly use the settings maintained to this profile.
    Please make sure that if a user-id is assigned to more than one role and both these roles is used in different  profiles then in this case you have to explicitly mention the user-id in the profile directly rather than using  only the role name.
    Below is the explanation with example :
    Consider that USER_1 is assigned to ROLE_1 and ROLE_2. And this USER_1 is linked to two different profiles  using these roles. If you want that USER_1 should use Profile_1 please make the settings as below :
    Profile_Key     Role      User Name
    Profile_1       ROLE_1       USER_1
    Profile_2       ROLE_2        -
    The below settings does not work, as system can pick wrong profile.
    Profile_Key     Role      User Name
    Profile_1       ROLE_1        -
    Profile_2       ROLE_2        -
    I hope this information could be useful for you and help to get your profile settings work.
    Another solution for controlling which storage category will be choosen is to use an implementation of BADI DOCUMENT_STORAGE01 with method BEFORE_LIST_STORAGECAT.
    Best regards,
    Christoph

  • I closed apps following the "swipe up" method and it appeared all were closed. However, when I checked in "Apps" it indicated 13 more apps were still open. How do I close them?

    I closed apps following the "swipe up" method and it appeared all were closed. However, when I checked in "Apps" it indicated 13 more apps were still open. How do I close them?

    Hi,
    Can you please share the logs?
    You can use the Adobe  Log Collector tool (Log Collector Tool) and share the corresponding zip file @ [email protected]
    Thanks,
    Shikha

  • My Mac is opening my doc in preview instead of Adobe. I loaded the latest version. It still opens in preview and I get a blank page even though the doc is there. How do I handle this?

    How do I open a doc in adobe instead of preview?   Three Imac people in a group all having the same problem. I was told to download the latest Adobe, which I did. I still cant view the document even though I downloaded it to read it. It keeps opening in Preview and shows up blank. Help!

    Right click on the document and select Open with-Adobe Acrobat. Or right click on the document and select get info, go to the open with drop down menu and select Acrobat. If you want all documents of that type to open with Acrobat check the box.

  • Open Slaes Order-How to check and close ?

    Hi,
    We have an open sales order which looks like the delivery is closed and 100% completed, but the sales order is still open!
    Now i know this is an ongoing issue which has several possible reasons for and i have used a script to see what is returned but nothing.
      Can you let me know how to check if there were any changes made in any particular Sales orders ?
    eg comparing open items list of sales orders with something ?
    Thank you in advance,

    Hi,
    Yes we ran the query in note 948670 and it came back zero for all?! See below for details.
    This is what has thrown us so what is the simplest way to check why a SO remains open i.e how to check if there were any changes made?
    Rdr u2013 0 Rows
    Dln - 0 Rows
    Rdn - 0 Rows
    Por - 0 Rows
    Pdn - 0 Rows
    Rpd - 0 Rows

  • I have a new IMAC with a Maverick platform (I can update to Yosemite). I did all graphics on a G5 Power PC (very old), in Freehand (very old)... How can I open old Freehand files on this new Mac? Can I still open and work in Freehand on this new Mac?

    I have a new IMAC with a Maverick platform (I can update to Yosemite). I did all graphics on a G5 Power PC (very old), in Freehand (very old)...
    How can I open old Freehand files on this new Mac?
    Can I still open and work in Freehand on this new Mac?

    Let me see if I've gotten this right! You want to remove an account from BOTH machines? Do this for your new machine first, then for the other.
    Click the Apple logo on the top left of the screen, System Preferences, Users and Groups (under Systems), unlock the lock in the window if its locked (you need to know the password), select the user that you wish to remove, and click the - sign next to the + sign for Login options. A window will pop up with some options. Select Delete this user and securely, and click 'Delete user'.
    After this, do an update from the App Store.
    Thats all there is to it.
    For the other machine repeat the process except for one thing. Before you delete the user in this case YOU, you will have to give Administrator priviledges to your son bu checking the box 'Allow user to administer this computer'.
    Do NOT do anything from Finder ... if you dont know how to fix the consequences of the problems caused.
    There is no need to unauthorize your iTunes account on your new machine. Do it on the old machine though.

  • How to force checked out CSV Files to open in Excel and not in Notepad

    Hi,
    I'm looking for some pointers / direction.
    .CSV files on SharePoint 2010 document library opens up in notepad by default. I did the DocIcon.xml CSV entry, changed the MIME type in IIS and did the IIS reset. Also on client computer CSV file is associated with MS Excel 2013. Now clicking a CSV file
    opens it up in MS Excel.
    Now a user checks out a CSV file and the same user clicks on the CSV file, the file is opening in notepad! If other users clicks on the same checked out file (checked out by the first user) it opens up in Excel for them. I've tried the 'Edit in Microsoft
    Excel' from the pop up menu but with same result.
    How can I force a checked out CSV file to open in MS Excel?
    Thanks

    1. Highlight one of the images and press cmd+i (or right click and select "Get info")
    2. Click the dropdown menu and select Photoshop (you might have to click "Other..." to find it.
    3. Then click "Change All" button below.
    You're going to have to do this with every different TYPE of image (e.g. jpeg, tiff etc) but once you've covered all the types you won't have the problem again.
    Hope this helps!

  • How do I block a popup window that I have allowed to open on Firefox once? I now have the popup blocker set to block all sites, but the popup still opens every time I open Firefox or open (sometimes) a new tab.

    How do I block a popup? I allowed this popup to open once. Now I have set the popup blocker to block all sites but this popup still opens every time I open Firefox and sometimes (usually) when I open a new tab.
    I Have stopped and restarted Firefox multiple times.
    I have rebooted the computer.
    I have set the tools/options/content/block pop-up windows/exceptions to block all sites (no exceptions).
    I have no other issues with Firefox.
    I have Adblock plus (with (1) subscription) installed
    I am currently using Firefox version 4.0 on Windows7 Ultimate.

    Just to address the last point: check your History menu to see whether you have the Restore Previous Session option and use that if you can. If that is grayed out or doesn't restore everything, check the Recently Closed Windows and Recently Closed Tabs lists for other pages.
    The unwanted window may be generated by an add-on. Try disabling ALL nonessential or unrecognized extensions on the Add-ons page. Either:
    * Ctrl+Shift+a
    * "3-bar" menu button (or Tools menu) > Add-ons
    In the left column, click Extensions. Then, if in doubt, disable.
    Usually a link will appear above at least one disabled extension to restart Firefox. You can complete your work on the tab and click one of the links as the last step.
    Any improvement?
    Here are some other things to check:
    (1) user.js file that changes Firefox startup behavior and overrides your preferences. This article describes how to track that down and delete it if you have one: [[How to fix preferences that won't save]].
    (2) Possible hijacked shortcut. Check the "target" of the desktop icon you use to start Firefox to see whether it lists the unwanted page. To do that:
    right-click the icon > Properties > Shortcut tab
    For 64-bit Windows 7, the Target should be no more and no less than this:
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    (3) Possible undisclosed bundle items. If you have installed any free software recently, check your Windows Control Panel, Uninstall a program for surprises. If you click the "Installed on" column head to group by date, it is easier to spot bundled junk. Remove everything suspicious or unrecognized.
    (4) Supplemental clean up scans. Our support article lists tools other Firefox users have found helpful: [[Troubleshoot Firefox issues caused by malware]].
    Hopefully that cures it.

  • I can't open any of my Word documents on my Apple Mac. The error code is EXC_CRASH (SIGABRT) and the  blame module name is WordArt. The documents are still there, and I can open them on my iPad when I email them there. Any ideas?

    I can't open any of my Word documents on my Apple Mac. The error code is EXC_CRASH (SIGABRT) and the blame module name is WordArt. The documents are still there, and I can open them on my iPad when I email them there. Any ideas?

    Uhhhhh... Thank GOD... Got all of my files.
    Spent some time on the phone with Apple Care... who was great to deal with but actually... not as helpful as I was hoping. It was suggested that I try DiskWarrior 4 to try to recover the files. $108 later, I had no files.
    More calls with Apple Care and they were pretty sure that everything was gone since once the External drive was installed, like a moron, I let TimeMachine go ahead and back up my new MacBook... so it overwrote who knows how many gig that was my entire MacBook.
    I wasn't giving up so I called Maxtor, the manufacturer of the external drive itself. They suggested file recovery software from I365... which is also a Seagate company (the makers of the drive). The suggested I simply use their demo because the demo version would find the files. If it found them, I could buy the software to restore them.
    It found them! Another $129 after and I was able to restore all of them back to my old PC laptop.
    NOW, I just need to figure out how to get the 50gig of HD video files off of my old laptop now and into my Mac and IMovie so I can actually make some DVDs out of them!
    I get that Macs and PCs are different formats but I think it is ridiculous that formatting still means basically just wiping out or at least treating massive lots of old data as if it isn't there. There's gotta be a better way to do that.

  • How can i delete an app on my desktop that says it won't delete because it's still open, even though i have done force quit numerous times.

    How can i delete an app on my desktop that says it won't delete because it's still open, even though i have done force quit numerous times? I even deleted it's files in my Finder and it just won't go away.  Help please!! TIA

    Restart the computer then delete it.
    Uninstalling Software: The Basics
    Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash.  Applications may create preference files that are stored in the /Home/Library/Preferences/ folder.  Although they do nothing once you delete the associated application, they do take up some disk space.  If you want you can look for them in the above location and delete them, too.
    Some applications may install an uninstaller program that can be used to remove the application.  In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
    Some applications may install components in the /Home/Library/Applications Support/ folder.  You can also check there to see if the application has created a folder.  You can also delete the folder that's in the Applications Support folder.  Again, they don't do anything but take up disk space once the application is trashed.
    Some applications may install a startupitem or a Log In item.  Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder.  Log In Items are set in the Accounts preferences.  Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab.  Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
    Some software use startup daemons or agents that are a new feature of the OS.  Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
    If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term.  Unfortunately Spotlight will not look in certain folders by default.  You can modify Spotlight's behavior or use a third-party search utility, EasyFind, instead.
    Some applications install a receipt in the /Library/Receipts/ folder.  Usually with the same name as the program or the developer.  The item generally has a ".pkg" extension.  Be sure you also delete this item as some programs use it to determine if it's already installed.
    There are many utilities that can uninstall applications.  Here is a selection:
        1. AppZapper 2.0.1
        2. AppDelete 3.2.6
        3. Automaton 1.50
        4. Hazel
        5. AppCleaner 2.1.0
        6. CleanApp
        7. iTrash 1.8.2
        8. Amnesia
        9. Uninstaller 1.15.1
      10. Spring Cleaning 11.0.1
    For more information visit The XLab FAQs and read the FAQ on removing software.

Maybe you are looking for