PDDoc.Save doesn't save on 1st (and sometimes 2nd, 3rd, 4th etc...) try, but saves eventually

Basically, I have a List of files to import to my C# program from a directory.
The C# program opens the files in Acrobat X, runs a plugin on them, and once the plug in has completed, it saves the files to another location.
AcroAppClass mApp = new AcroAppClass();
AcroAVDocClass avDoc = new AcroAVDocClass();
AcroPDDoc pdDoc = new AcroPDDoc();
if (avDoc.Open(fileToOpen, ""))
    pdDoc = (AcroPDDoc)avDoc.GetPDDoc();
    mApp.MenuItemExeute("My plugin name");
    bool saved = false;
    while(!saved)
        pdDoc.Save((short)(PDSaveFlags.PDSaveFull | PDSaveFlags.PDSaveCopy | PDSaveFlags.PDSaveLinearized | PDSaveFlags.PDSaveCollectGarbage), saveFileName);
        if(File.Exists(saveFileName)
           saved = true;
       else
           Console.WriteLine("Save failed");
The while(!saved) loop runs anywhere from 1 to x times. x has been has high as 10 times, or as low as 2, but never 1.
Why may this be?
I have full Administrative access to the drive, the files and the folders. The INTERESTING point is that eventually, after executing the PDDoc.Save command multiple times,
the file does end up saving, but this can't be correct operation, right?

BarlaeDC, the plugin edits the annotations in the document to update the links to URI annotations instead of standard Launch annotations.
Is there a way to get a report back from my plugin to my calling application so that it knows when the plugin is completed doing its job?
Bernd, application requirements by the client do not permit saving through the plugin. They want the C# code called through even another program, and need the C# to report back to it about the save.

Similar Messages

  • How do I activate AUTOMATIC superscripting for numbers / dates; e.g. 1st, 2nd, 3rd, 4th, etc .... It used to do this in all PRE-5.0 versions of Pages; now, it is GONE from Pages 5.0, and I cannot find out where / how to activate it !!

    How do I activate AUTOMATIC superscripting for numbers / dates; e.g. 1st, 2nd, 3rd, 4th, etc .... It used to do this in all PRE-5.0 versions of Pages; now, it is GONE from Pages 5.0, and I cannot find out where / how to activate it !!

    Whilst I appreciate your responding - I do not think this helps with what I was enquiring (at least not without further explanations anyways).
    I am aware of, and do use, the function - System Preferences > Keyboard > Text - for various replacements like (tm), (c), etc .... and also for fractions like 1/2, 1/4, 1/3.
    However, my question was in relation to SUPERSCRIPTS for dates / numbers - namely, superscripting numerical suffixes for things like 1st, 2nd, 3rd, 4th,
    So - please help - HOW do I set this up ? If indeed it is possible without System Preferences > Keyboard > Text ???

  • ?Why do you have to enter it several times over to get an alert in the diary to accept a 1 hr alert to go off 1st and then 2nd alert at 30 mins

    Why is there a problem getting an I phone to accept the fact that I want it to alert me on the first time it goes off an hour before any event and the 2nd alert at 30 mins before the event? I enter the 1st alert for 1 hour and the 2nd alert for 30 mins but it always saves as 30 mins on the 1st alert and an hour as the 2nd alert. It seems the only way around this to to re-enter it several times over and over to get the phone to accept what I want it to do which is time consuming and annoying. Please help.

    I have experiencing this, but only since I have installed I o s 7
    Very frustrating.
    M

  • When using FaceTime, my iMac makes noises.  It dings like I am receiving an email and sometimes sounds like a busy signal, but this is while I am talking to someone. Any suggestions?

    When using FaceTime, my iMac makes noises.  It dings like I am receiving an email and sometimes sounds like a busy signal, but this is while I am talking to someone.  Any suggestions?

    Dear Mr. Toad (my all-time favorite ride at Disneyland ;-) ..
    Thanks so much for your detailed reply.. my netbook is in the bedroom, turned off.. I (so far) only use it in the evening, in the bedroom.. I've saved your response, and will try your suggestions, and let you know if they solve the problem I described. I really appreciate you taking the time to post such a detailed reply..
    I can't answer your Thunderbird "configuration" questions, because I'm in the living room, using the crap Vista laptop, on which I plan to install Thunderbird, and then take Windoze Mail out in the street and drive over it a few times.. I'll get back to you one way or the other, and let you know if your instructions solved the problem, or not..
    I don't understand why Thunderbird "out of the box", so to speak, simply doesn't forward HTML emails with embedded graphics, (like Outlook Excess, and Winblows Mail do).. without having to go through those steps. I personally HATE HTML email, but over the years, it's become more and more prevelant.. so it's a problem I must fix..
    Thanks again..
    Harv..

  • HT5622 Good day!! I was having two Iphones with same icloud id, later i deleted 1 id from one device, and made 2nd id for this device but same time my old id is stored on other device and i can not change it with another id, can any1 guide me on this issu

    Good day!! I was having two Iphones with same icloud id, later i deleted 1 id from one device, and made 2nd id for this device but same time my old id is stored on other device and i can not change it with another id, can any1 guide me on this issue.

    Log in to icloud.com on a web browser and remove the device from "Find My iPhone"

  • I have updated to itunes 10.5 and now it doesn't recognize our iphones and says we need a driver installer but then throws a notice saying an error occured. Anyone know anything about this?  :)

    I have updated to itunes 10.5 on my Mac computer and now it doesn't recognize my iphones and says i need to install a device driver but when i try to install it it throws up a notification saying an error occured and to contact the makers of my device 's suppot website.  Anyone know?

    Have you tried repairing your application from within the Control Panel?

  • When i click a button the webpage doesn't load... and sometimes the whole pages goes white and just shows words on the far left...

    idk if it is java or what, but every time i go to certain websites, like youtube.com they go blank and just show words, no images or nothing.. however i updated something and youtube works fine.. but now a website called roblox.com every time i hit the play button on a game, (it should load the game into a new window) doesn't do nothing when i click the icon.. to load it... can anyone help me with this problem?
    i have a windows 7 quad-core latest version of Firefox, so i have no idea, i think when i updated something it messed up the java source code.. or my Firefox got messed up... plz help?

    Hello,
    To protect against potential Java vulnerabilities, Firefox now asks you to activate Java by default, for each website you visit that uses Java. When you see an "Activate Java" message box, simply click it to load the Java content normally.
    [[Image:Fx24-JavaActivate]]
    If there is no visible area to activate Java content in the page, click the plugin icon in the address bar. In the message panel that opens, choose "Allow Now" to enable Java content temporarily.
    [[Image:Fx24-JavaAllowNow]]
    The next time you visit the site or any other that uses Java you will see this message again. If you want to always activate Java for a particular site, you can use the "Allow and Remember" option shown above.
    For more information about using Java in Firefox, see the articles [[How to allow Java on trusted sites]] and [[Use the Java plugin to view interactive content on websites]].
    '''Important:''' After activating Java, you may see a security prompt, asking you to confirm that you want to run Java, or you may see an "Application Blocked" message, depending on the website and your security settings in the [http://www.java.com/en/download/help/jcp_security.xml#control%20panel Java Control Panel]. These messages come from Java itself, not from Firefox.
    For help with Java security prompts and "Application Blocked" messages, see the Java Help pages [http://www.java.com/en/download/help/appsecuritydialogs.xml What should I do when I see a security prompt from Java?] and [http://www.java.com/en/download/help/java_blocked.xml Why are Java applications blocked by your security settings with the latest Java?]
    Does this solve your problem? Let us know.

  • TS1398 I'm connected to the Internet and can access Facebook, Skype etc. BUT my  yahoo e mails have all of a sudden stopped coming in since yesterday. How can I remedy this?

    My iPad 2 is connected to the wifi , I have all Internet access but cannot receive my mail. It stopped receiving mail yesterday afternoon all of a sudden. What can I do to remedy this. I haven't changed any of my settings.
    Another question is that I haven't been asked by the I pad to make any updates. do I need to do something to update the iPad. I got the iPad inDecember 2011.
    Answers will be greatly appreciated.

    No one even has an idea? I'm lost.

  • Installing 8.1.052 doesn't work... and now I've lost the previous version!

    Tried to download and install 8.1.052 (using both Apple installer and 'download only' +manual installation). As soon as I select installation options/directory it says "itunes installer completed. The installer encountered errors before itunes could be configured. Your system has not been modified". I have deleted the update, done a cold reboot, re-downloaded and tried again, but it doesn't work... and now my old shortcuts etc. to itunes have disappeared! Any suggestions please?

    It may be you got no responses here because your questions really belong in other forums:
    Backup:
    http://discussions.apple.com/forum.jspa?forumID=956
    iWeb:
    http://discussions.apple.com/forum.jspa?forumID=1108
    PS Since Backup has a QuickPick for the iWeb Domain file, I am puzzled how you could not find it to back it up.

  • Firefox tells me my banking site is not secure and scares the bejabbers out of me, but Internet Explorer has no trouble connecting.

    Yellow screen appears, sometimes when the user id is inserted and sometimes the user id is okay but then when the password is inserted. It warns the site has not returned a proper certificate and to proceed at my risk.
    The on-line banking support service advised trying Explorer as the browser and it worked just fine. Could somebody hacked into only my FireFox account and it really is in jeopardy?
    Is there any support service for FireFox other than volunteers when available?
    Dhank you and Regards,
    David D.

    https://support.mozilla.com/en-US/kb/Configuring%20McAfee%20Internet%20Security
    Why not at least get the latest version of FF 3.6.*, which is 3.6.20?

  • I am trying to make a signature in MS Word (2007) which includes a jpg image, but when I save it as a HTML file and attach it the text appers OK but the image doesn't. I have tried various formats but still no luck. Can anyone help?

    I am trying to make a signature in MS Word (2007) which includes a jpg image, but when I save it as a HTML file and attach it the text appers OK but the image doesn't. I have tried various formats but still no luck. Can anyone help? edit

    C'mon! Anyone???? I'm desperate!

  • PDDoc Save Problem

    I have a script written in VBA (Outlook 2003, Win XP, Acrobat 9) that works on one machine but not another. The problematic part is the PDDoc.Save with which I'm saving the file to a new path and filename.
    When it doesn't work the PDDoc.Save returns True as if it DID save but no PDF is produced and the name of the open PDF doesn't change.
    Again, this works on one machine but not another and I've been unable to figure out what the difference.
    Any ideas?
    Thanks!
    Ken

    I've posted the question to the SDK forum, though I'm not sure why this would fall under the guise of the SDK and not just scripting.
    I mentioned in the initial post that the Acrobat version is 9, 9.4.3 to be exact, on both machines. I've also since tested it on a third machine and, again, it worked just fine.
    The code is pretty straight forward:
        Set AcroAVDoc = Acro.GetActiveDoc
        Set AcroPDDoc = AcroAVDoc.GetPDDoc
        WasSaved = AcroPDDoc.Save(AcroSave.WebOptimized, CheckPath$ & PDFName$)
    I've double and triple checked all the parameters and they're correct when the PDDoc.Save is executed so I'm at a loss as to why it's not actually doing anything.
    Is there some sort of setting in Acrobat that might be preventing the scripting from saving the file?
    Thanks again

  • How to tell PDDoc.Save() to use CombatibillityLevel 1.4?

    My application is using OLE to open PDF Files in Acrobat 9 and store them optimized for fast web access, again. Unfortunately, Acrobat stores the files as PDF 1.7 even if they were PDF 1.4 before.
    Is there any possibility to tell Arcrobat 9 to use PDF 1.4 (no matter if generall configuration or OLE command)?
    I´ve already tried to set the compabillty level in the distiller configuration but it seems, that PDDoc.Save always ignores these configurations.

    ok, thank you very much. It seems I have to look for a third party tool to convert my PDFs to PDFs with fast web access enabled. Just one last question: Is there a way to configure my Acrobat Installation to always save any pdf in PDF Version 1.4 (like the CombatibillityLevel Setting in Distiller)?

  • I always chose "save & quit" when I close and sometimes all my history is gone when I open Firefox again. Why? It just happened again. Can I get that history back?

    I always chose "save & quit" when I close and sometimes all my history is gone when I open Firefox again. Why? It just happened again. Can I get that history back?

    You get message "firefox is still running" and computer restart doesn't help you. Try the advice below.
    Make sure Firefox isn't running (end firefox.exe process in Task Manager or restart computer)
    Find your profile folder
    C:\Documents and Settings\USERNAME\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default
    find file "parent.lock" in it and delete it (the file is empty, its function is to signify to Firefox whether it's already open or not).
    Then try to open Firefox again. Will it start or not? What will it say?

  • PdDoc.Save()

    I am having trouble saving a pdf. I'm using the SDK in C#. My project just grabs a bunch of pdf files and merges them.
    I have added a COM reference to Acrobat.
    I open the first one manually using avDoc, then with pdDoc.
    Then I loop through the rest of the files and append them to the first doc.
    After I am done merging, I try to save by using pdDoc.Save(), but for the first argument nType, I can't get any value to work in there. I tried putting PDSaveFull, but that didn't show up in intellisense and it gave me an error, then i tried to put 1, but that just returned false.
    Am I missing some other reference? Or am I just doing something completely wrong?

    After playing around with it more, I got it. Thanks =)

Maybe you are looking for