Code to destroy annotations does not seem to be executed

Hello

My PDF document contains JavaScript code that removes annotations as one of its initialization steps.  This is because the main body of the program creates many annotations.  If the user saves the document PDF (against the advice I provided), annotations created by just will all be saved in the document.  When the user opens the document, just kept annotations will be still there that the program will create new annotations that will be "superimposed" on existing annotations.

So, I added the standard code annotation-destroyed during the initialization of my JavaScript that everyone seems to use:

var annots = this.getAnnots ({nPage:0});})  my document has only 1 page

If (annots! = null)

{

Console.println ("Annots @ input =" + annots.length);  print the number of annotations to remove

for (var i = 0; i < annots.length; i ++)

Annots [i]. Destroy();

}

The problem is that the above code is not executed during initialization, and the number of games embedded in the document annotation just climbing guard whenever I have to open/save the document.

I can force the JavaScript to be re-run as follows (in Acrobat 9):

Advanced > Document processing > sheet of JavaScripts...

This opens the dialog box "JavaScript functions".  When I close this dialog box, the JavaScript is rerun and the annotations are all removed as evidenced by console.println statement view annotations how are deleted.

So my question is: How can ensure me that the destructive code annotation is performed when I open the document each time?

Record/opening/closing the document 10 times, it will create 10 sets of annotations in document duplicate.  Only when I raise the "JavaScript functions" dialog box, and then close the 10 sets of annotations are cleared as evidenced by the statement of console.println.  Of course, my users based on Adobe Reader will not have this option.

I think that my question translates as: How to make sure that that the JavaScript engine correctly recognizes that there are pre-existing annotations when I open my PDF document?  Currently, this recognition seems to happen when I use the "JavaScript functions" dialog box for re - run my code.

Thanks for the ideas everyone has about my question!

Dave

Try calling this.syncAnnotScan () before you run the rest of your code.

Tags: Acrobat

Similar Questions

  • Internet does not seem to work after you have uninstalled Avira Premium Edition, but Google Chrome works

    Recently, I uninstalled Avira Premium Edition. I opted for 1 month trial but I uninstalled before the expiry of 1 month. The uninstall process went well. But when I restarted the computer, the Internet does not seem to work, but Google Chrome works as usual. When I tried to connect to MSN, it says "error Code: 80072ee7. It's something on the Internet connection. I guess it takes some files that must have accidentally disappeared with the uninstall process.

    Any help will be greatly appreciated. Thank you.

    Hello

    If Internet does not cam chrome Google work either.

    So, we know not what does not work.

    In any case, try this.


    WinSock and TCP/IP update.

    Type Cmd in the search text box.

    Press Ctrl-Shift-Enter keyboard shortcut to run a command as administrator prompt.  Allow the elevation.

    Type netsh winsock reset at the command prompt and press the Enter key.

    Do the same process to refresh the TCP/IP just replace the command typed with.

    netsh interface ipv4 reset Press enter

    netsh interface ipv6 reset Press enter

    ipconfig/flushdns press Enter

    Restart your computer.

    Jack - Microsoft MVP, Windows networking. WWW.EZLAN.NET

  • BBC Iplayer - Flash Player Error ("content does not seem to work")

    Hello

    I use a Mac OSX El Capitan-version 10.11.3

    Browser Safari version 9.0.3

    Flash Player version 21.0.0.197

    The problem:

    Various shows on the BBC Iplayer play and displays the following message: this content does not seem to work. "Please try again later".

    It occurs on all the shows, but a bit random. When I right click in the window of the video I get this, tells me that there is a "Flash 1024 error."

    Screen Shot 2016-03-27 at 3.39.47 PM.png

    When I copy the content, the error is:

    Error code: EmpBaseErrorVO

    code = 1024

    type = either reading is possible due to a mistake of the mediation

    Details =.

    1026

    severity = critical

    responsibility = MediaSelector

    Info = 1026

    I tried constantly to turn ugly. No online forums provide clarity. Can someone from Adobe explain please what means this error and what I can do to solve this problem?

    Thank you

    Hello

    This started after 21.0.0.197 updated?  It worked very well in the previous (21.0.0.182) version?

    You have installed/activated advertising blockers?

    You access the site through the VPN?

    You have installed security software/utility?  If so, which?

    It works with other browsers (Firefox, Chrome, etc.)?

    --

    Maria

  • Why a feature of CFLOCK does not seem like a bug?


    I searched this forum for discussions about cflock
    and read the livedocs at http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=sharedVars_20.html.
    This reading is above me, thinking that I already knew
    all about using the cflock tag.

    Apparently, I'm not a very critical situation
    the appearance of the tag cflock when the scope of the session locking.

    My question is about a user, a single session, multiple
    and the simultaneous requests coming to the CF8 server
    the same session of the user.

    Sense, a web page that uses ajax, frameworks, pop-ups,
    or the user by pressing ctrl-n-va generate several
    requests to the server CF8 using the same session.

    Based on my understanding, using type = "exclusive will."
    effectively single-threaded access to the code between
    the label. So my question is:


    Why < cflock scope = "session" type = 'exclusive'... >
    single-threaded access to the code between the cflock
    Tag?


    If you are nice enough to answer, I would really
    explain why the current behavior
    in CF8 is the most correct behavior. If the scope
    past of the session of the application or server, it
    will be infact single-threaded execution access.
    Then why is it not the case when the scope is session?

    I came to this problem because I was trying
    to explain to someone the difference between:

    < cflock scope = "session" type = 'exclusive'... >
    and
    < cflock scope = "session" type = "readOnly"... >


    Based on my test simple and what I see, I discovered
    I don't know the difference!


    I know how to re - write the code to perform exactly
    what I want to do. I can't seem to wrap
    my head around why the cflock tag is implemented
    in this way (in which case the session and exclusivity).

    However, it is more likely that I have a bug in my
    simple test... code?

    If you are interested, here's the code I used to
    confirm/test my hypothesis:


    Thanks for reading this post to the end!

    Thank you all to consider this topic.

    Unfortunately the answer was because of my bad code.

    Tip and the Azadi persistence paid off.

    The question was NOT because of my tag
    having the REQUIRED 'NAME' attribute

    I have observed the behavior desired by
    just change my new code sample to include
    the name in my tag attribute.

    Thanks again to everyone who gave this post
    in-depth reflection.

    Moreover, in CF5, the name attribute is a required
    attribute. Post CF5 it is optional. After having
    through six different environments with six different
    configurations, I found a CD CF5 and installed.

    After removing the code java-ish, I quickly
    an error message indicating that the name attribute is a required
    attribute... Ouch.

    Perhaps one of the Adobe ColdFusion team
    can make a change that if the validator tag seen
    This line of code...

    the validator tag will throw an error indicating that
    the NAME attribute is missing.

    Maybe I titled this section as:

    Why a cfapplication feature does not seem like a bug?
    When sessionmanagement = true and the name of the attribute is missing

  • Process does not seem to run on Page 1

    After the user authenticates and is redirected to page 1 of the application, I want to put 4 session state variables. I'll put the variables with a pl/sql procedure call defined in section page process 1.
    The procedure call does not seem to run. Session state values are not defined and the procedure needs to connect to a table and it is not. I'm going crazy trying to figure this! Any help is appreciated.

    I tried to define the procedure to run with point of process value 'on new Instance, after authentication' and 'on the load - before the Header. " Nothing seems to work.
    Thanks for any ideas you may have,
    Reid

    Reid,

    Have you tried running in Debug mode to see what events occur? Or go to Page 1 and change the display of events. This should give an idea of what is supposed to work.

    One solution might be to run the process to Page 1 on new Session: after authentication, then just set the variables if one is currently zero, so it does not work whenever the user visits page 1. I used this technique successfully in my magnum opus.

    You can do this with a condition or write directly in the process of PL/SQL code.

    For example:

    DECLARE
    l_id_num VARCHAR2 (10): = v ('APP_ID_NUMBER');
    BEGIN
    IF l_id_num IS NOT NULL
    THEN
    ...

    Good luck

    Stew

  • Last update of Safari is more you show your cookies and does not seem to allow you to remove them. Is this a decision of Apple?

    Last Safari doesn't show cookies and does not seem to allow their removal. Why?

    Data of Safari/Preferences/Privacy / website management.

  • As it can be seen in the OS 3 Web page will be available today, 13 September. However my Watch App does not seem to see the update according to the availability. When I go to software update, he repeats that my watch is up-to-date with OS 2.2.2. OS3 will

    As it can be seen in the OS 3 Web page will be available today, 13 September. However my Watch App does not seem to see the update according to the availability. When I go to software update, he repeats that my watch is up-to-date with OS 2.2.2. OS3 will be available today?

    Hello

    Yes - Apple advises that watch OS 3 is scheduled to be released sometime today.

  • I have a blank Memorex music CD - R stuck in my superdrive drive and it will not eject.  It does not seem to recognize that there is a disc inserted.  Any ideas?  Help - I'm a rookie.  :)

    I have a blank Memorex music CD - R stuck in my superdrive drive and it will not eject.  It does not seem to recognize that there is a disc inserted.  Any ideas?  Help - I'm a rookie.

    It worked - search for "Terminal" and then type "drutil eject external" thanks for the help.

    DiabloDog

  • DirectX does not seem to install it on my laptop, A30

    DirectX (any number) does not seem to install properly and, therefore, pc games does not work and that they cause the pc turns off. any help?

    Hello
    as far as I know, supports the DirectX8 just A30 Series.

    What error message do you get?

    Good bye

  • Re: CD/DVD drive does not seem to start the DVD in Satellite P750

    My CD/DVD drive does not seem to start DVD, it runs and runs and the only way I can run a DVD (i.e. film) is using Windows Media Center, while the software to install must be enabled in Windows Explorer.

    Anyone?

    Help, please.
    Thank you!

    Have you tried to change AutoPlay settings?
    Open Control Panel and Auto game options. Enable the option Use AutoPlay for all media and devices. Also change other options, especially for DVD movies, software and games.

  • Satellite Pro 6050: WLan controller does not seem to be in Device Manager

    I'm a novice guy with computers.

    Well, I re-formated my laptop and re-installed all the drivers, but my wirless lan controller does not seem to be in my device manager.
    I was just wondering, if the driver needed to be installed in a certain order. I also had my add on the Vodaphone mobile card plugged into slot on the side that would make a difference?

    in any well any help would be great
    Dane :-)

    Hello

    As far as I know that the WLan card was optional on this unit. In this case, if you bought the device with wireless network card that WLAN should appears in Device Manager. But if you bought the laptop without the WLan card you won't find it in Device Manager.

    PS: The recovery CD already includes the WLan driver and you don't need to t in addition no driver to install.

  • How to unlink a text box? Break in the menu icon does not seem to work.

    How to untie the two text boxes?  The break in the menu link icon does not seem to work.

    Hello

    We would like to know the following details from you to help you to come.

    (1) what application you want to use?

    (2) text box are what line you referring?

    (3) what version of the Windows operating system you have installed on your computer?

    (4) what happens when you click on the pause icon

    Your answers are important to us. Please write to us with more description of the issue so that we can understand the question better to help you.

  • I ran several analyzers antivirus from AVG to ODILE and none of them does not seem to get rid of this virus (Exploit: win32 / pdfjsc.dr)

    I ran several analyzers antivirus from AVG to ODILE and none of them does not seem to get rid of this virus (Exploit: win32 / pdfjsc.dr)

    Any suggestions apart from simply all formatting?

    Hello

    Exploit: Win32 / Pdfjsc.Dr
    http://www.Microsoft.com/security/portal/threat/encyclopedia/entry.aspx?name=exploit%3aWin32%2fPdfjsc.Dr

    If you need search malware here's my recommendations - they will allow you to
    scrutiny and the withdrawal without ending up with a load of spyware programs running
    resident who can cause as many questions as the malware and may be harder to detect as
    the cause.

    No one program cannot be used to detect and remove any malware. Added that often easy
    to detect malicious software often comes with a much harder to detect and remove the payload. Then
    its best to be thorough than paying the high price later now too. Check with them to one
    extreme overkill point and then run the cleaning only when you are sure that the system is clean.

    It can be made repeatedly in Mode safe - F8 tap that you start, however, you must also run
    the regular windows when you can.

    TDSSKiller.exe. - Download the desktop - so go ahead and right-click on it - RUN AS ADMIN
    It will display all the infections in the report after you run - if it will not run changed the name of
    TDSSKiller.exe to tdsskiller.com. If she finds something or not does not mean that you should not
    check with the other methods below.
    http://support.Kaspersky.com/viruses/solutions?QID=208280684

    Download malwarebytes and scan with it, run MRT and add Prevx to be sure that he is gone.
    (If Rootkits run UnHackMe)

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Malwarebytes - free
    http://www.Malwarebytes.org/products/malwarebytes_free

    SuperAntiSpyware Portable Scanner - free
    http://www.SUPERAntiSpyware.com/portablescanner.HTML?tag=SAS_HOMEPAGE

    Run the malware removal tool from Microsoft

    Start - type in the search box-> find MRT top - right on - click RUN AS ADMIN.

    You should get this tool and its updates via Windows updates - if necessary, you can
    Download it here.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN
    (Then run MRT as shown above.)

    Microsoft Malicious - 32-bit removal tool
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=AD724AE0-E72D-4F54-9AB3-75B8EB148356&displaylang=en

    Microsoft Malicious removal tool - 64 bit
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=585D2BDE-367F-495e-94E7-6349F4EFFC74&displaylang=en

    also install Prevx to be sure that it is all gone.

    Download - SAVE - go to where you put it-right on - click RUN AS ADMIN

    Prevx - Home - free - small, fast, exceptional CLOUD protection, working with others
    security programs. It is a single scanner, VERY EFFICIENT, if it finds something to come back
    here or use Google to see how to remove.
    http://www.prevx.com/   <-->
    http://info.prevx.com/downloadcsi.asp?prevx=Y  <-->

    Choice of PCmag editor - Prevx-
    http://www.PCMag.com/Article2/0, 2817,2346862,00.asp

    Try the demo version of Hitman Pro:

    Hitman Pro is a second scanner reviews, designed to save your computer from malicious software
    (viruses, Trojans, rootkits, etc.). who infected your computer despite safe
    what you have done (such as antivirus, firewall, etc.).
    http://www.SurfRight.nl/en/hitmanpro

    --------------------------------------------------------

    If necessary here are some free online scanners to help the

    http://www.eset.com/onlinescan/

    -----------------------------------

    Original version is now replaced by the Microsoft Safety Scanner
    http://OneCare.live.com/site/en-us/default.htm

    Microsoft safety scanner
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    ----------------------------------

    http://www.Kaspersky.com/virusscanner

    Other tests free online
    http://www.Google.com/search?hl=en&source=HP&q=antivirus+free+online+scan&AQ=f&OQ=&AQI=G1

    --------------------------------------------------------

    After the removal of malicious programs:

    Also follow these steps for the General corruption of cleaning and repair/replace damaged/missing
    system files.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    RUN - type in the box-

    sfc/scannow

    Then run checkdisk (chkdsk).

    RUN - type in the box-

    Chkdsk /f /r

    -----------------------------------------------------------------------

    If we find Rootkits use this thread and other suggestions. (Run UnHackMe)

    http://social.answers.Microsoft.com/forums/en-us/InternetExplorer/thread/a8f665f0-C793-441A-a5b9-54b7e1e7a5a4/

    ================================

    For extreme cases:

    Norton Power Eraser - eliminates deeply embedded and difficult to remove crimeware
    This traditional antivirus analysis does not always detect. Because the Norton Power Eraser
    uses aggressive methods to detect these threats, there is a risk that it can select some
    legitimate programs for removal. You should use this tool very carefully and only after
    you have exhausted other options.
    http://us.Norton.com/support/DIY/index.jsp

    ================================

    If you are in North America, you can call 866-727-2338 for virus and spyware help
    infections. See http://www.microsoft.com/protect/support/default.mspx for more details. For
    international information, see your subsidiary local Support site.

    Microsoft support - Virus and Security Solution Center
    http://support.Microsoft.com/contactus/cu_sc_virsec_master?ws=support#TAB0

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • Backup Windows XP does not seem to be clear the attribute archive when you perform a normal backup.

    Backup Windows XP does not seem to be clear the attribute archive when you perform a normal backup.

    I do a backup of the 'Normal' at the beginning of the month.  Then, at the end of the first week, I do a "Differential" backup (using the same "backup job" but change to type "Incremental".)

    Well the difference is huge and to study, I see that a lot of files that I don't know that I didn't take the week since the 'Normal' backup have the Archive attribute set.

    Is the 'Normal' compensation not the bit mode backup of archive?  Another thing would be randomly set the attributes to archive?  Is there a ghost in the machine?  Inquiring minds want to know.

    Hello

    Differential backup marks files as having been backed up (in other words, archive attribute is not cleared). This is normal.

    For more information please visit:
    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/types_of_backup.mspx?mfr=true
    http://msdn.Microsoft.com/en-us/library/aa174458 (SQL.80) .aspx
    http://msdn.Microsoft.com/en-us/library/ms345448.aspx

    Thanks and greetings
    Umesh P - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • We made an update on all the pc company and going from XP to 7. Easy transfer does not seem to see computers that aren't on the same network segment.

    Try using the simple transfer of transfer from old pc (XP) user profiles to their new pc (7). Easy transfer does not seem to see through switches. If I have 2 machines in different parts of the plant the application will not be the handshake. What I am doing wrong?

    Nothing.  The 'old' and 'new' computers must be on the same subnet.  You can use the intermediate storage.

Maybe you are looking for

  • Notegorical app?  IOS 10 support?

    Hello - I was using Notegorical app to track very important info.  However, as I downloaded iOS 10, I can only see the notes I made, I can not add or copy/paste into another application.  Can someone tell me how to solve this problem or move my info

  • Impossible to search once the site with firefox

    I find a site with Firefox, once I'm there, I get those pop ups, even though I have a pop-up blocker on, and I can not search the site. For example, Harbor Freight tools. I get on the site and then impossible to search the site. It might be their sit

  • Equium M50 - motherboard is dead

    Hi all I decided that my motherboard is fried. Can advise you on a number of things pls? 1. since I need to get a new motherboard, there you can recommend that will fit the envelope for my equium m50? Or should I stay with perimeter? 2. What is the b

  • connecting macbook pro (A1278) to TV via hdmi cable

    I'm trying to connect my macbook pro (A1278) to my TV via the hdmi cable, but it doesn't work. The connection does not work. What is on my macbook screen does not appear on my TV. My tv displays just a black screen. Is there some sort of settings tha

  • We can I find a complete (with files) ecg under labview tutorial? Thanks for the replies

    I want to do a labview based ecg system and I would find something ready for use. Thanks for the reply.