Convert all the annotation GotoPage links javascript - need help

Hi all

I have a large document and my requirement is to find a set of words and add gotopage link to a particular page (index page). I recently got a file of Acrobat (http://acrobatusers.com/content/find-highlight-words-and-phrases) user group who has find and highlight a set of words using Acrobat action action.

This action is to "search for and remove text" action that will search for and delete selected text and a javascript to add the highlight of yellow color.

I changed the javascript code associated with this action in the following so that the script will find all payments made and convert in the Gotopage links and destroy annotations after you create the links.

I tried these steps in the following code:

  1. Find annotations
  2. Get the four value
  3. SetLink to page
  4. Destroy to delete annotations

I'm new to javascript and I read the javascript reference as much I could and tried as much as possible. But this script does not work and I couldn't identify what's not in the present.

Please, help me run this code.

for (var p = 0; p < this.numPages; p++)
{
//var numWords = this.getPageNumWords(p);
var numWords = this.getAnnots(p,{sortBy:"Author"});
for (var i=0; i<numWords.length; i++)
{
var ckWord = this.getPageNthWord(p, i, true);
if ( ckWord.type == "Redact")
{
var q = this.getPageNthWordQuads(p, i);
// Convert quads in default user space to rotated
// User space used by Links.
m = (new Matrix2D).fromRotated(this,p);
mInv = m.invert()
r = mInv.transform(q)
r=r.toString()
r = r.split(",");
l = addLink(p, [r[4], r[5], r[2], r[3]]);
l.borderColor = color.red
l.borderWidth = 0
l.setAction.("this.pageNum = 243");
}
}
}
var annots = this.getAnnots();
for (var i = 0; i < annots.length; i++)
if (annots[i].type == "Redact") annots[i].destroy();

If you want to use the same code, but just a single page (25) research, change this line of code to:

for (p = 25 variety; p)< 26;="">

Otherwise, you can remove the outer loop entirely and set the variable p 25 at the beginning of the script.

Tags: Acrobat

Similar Questions

  • I have a Hp Pavilion Media Center Edition 2002 running. How will I know if I have all the patches and updates, I need? Also is free upgrade to the edition of 2005?

    I have a Hp Pavilion Media Center Edition 2002 running. How will I know if I have all the patches and updates, I need? Also is free upgrade to the edition of 2005?

    Hi Philofduluth and thanks for posting.

    There is not a free upgrade for Media Center 2005. If this is something you would like to do, I contact your OEM manufacturer and ask if there is a software upgrade, they can provide you.

    If you have all the updates that are available for your system go to http://update.microsoft.com . Here, you can see all the latest reviews and optional updates that may be available to you and make install.

    I hope this helps. Let us know if you have any questions.

    Shawn - Support Engineer - MCP, MCDST
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • I tried to convert doc to the pds.  He converted all the files in you folder to the pds.  The problem is that I can't open any files without buying adobe.   I can't unconvert so now I can't read all the files?

    I tried to convert doc to the pds.  He converted all the files in you folder to the pds.  The problem is that I can't open any files without buying adobe.   I can't unconvert so now I can't read all the files?

    Hi chrism43238735,

    May I know the process to convert Doc to PDF files. If you use Acrobat to convert the files, and then with the same application you open.

    If you used another process, in this case try using the Adobe Acrobat Reader application. Adobe - Adobe Acrobat Reader DC Distribution

    Thank you

    Abhishek

  • Have XP Pro with the Panel open, click on add/remove progs - nothing happens. All the other c/Panel open Fredrick help OK

    Have XP Pro with the Panel open, click on add/remove progs - nothing happens. All the other c/Panel open Fredrick help OK

    Hey Fredrick,

    ·         You get the error message?

    ·         Did you do changes on the computer before the show?

    Follow these methods.

    Method 1: Run the following command:

    Start, run, Appwiz.cpl

    Check if you can run the Add / Remove programs.

    Method 2: Scan the file system (CFS) auditor to repair corrupted files.

    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)

    http://support.Microsoft.com/kb/310747

    Method 3: Follow these steps:

    Step 1: Start the computer in safe mode and check if the problem persists.

    A description of the options to start in Windows XP Mode

    http://support.Microsoft.com/kb/315222

    Step 2: If the problem does not still in safe mode, perform a clean boot to see if there is no conflict of software like clean boot helps you eliminate software conflicts.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Note: After completing the steps in the clean boot troubleshooting, follow the section How to configure Windows to use a Normal startup state of the link to return the computer to a Normal startupmode.

    After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.

    (a) click Start, run.

    (b) type msconfigand click OK.

    (c) the System Configuration Utility dialog box appears.

    (d) click the general tab, click Normal startup - load all services and device drivers and then click OK.

    (e) when you are prompted, click on restart to restart the computer.

    Method 4: Performs a search using the Microsoft safety scanner.

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

  • Adobe flash CS6 crashes when you use the text or Word of edition tool all the time... Please help!

    Adobe flash CS6 crashes when you use the text or Word of edition tool all the time... Please help!

    No one can tell you anything without the proper system or other technical details info. The standard answer with all the problems of text is quite simply, you have a "bad policy" on your system and need to get rid of him.

    Mylenium

  • the friends hyii UA HUD need help how to make a backup of the files from his deleted with (shift + delete) memory card

    the friends hyii UA HUD need help how to make a backup of the files from his deleted with (shift + delete) memory card

    Hello

    It seems that you want to restore the files removed from the memory card.

    I will definitely help you with this.

    I would say you can search the Internet for data recovery software by using your favorite search engine.

    Warning: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    It will be useful. If you have any other questions, feel free to let us know. We will be happy to help you.

    Thank you.

  • I want to install my office small business 2003 on my new laptop but can't find the installation cd. I have all the license information. Can Microsoft help me to make it work on the new laptop? Thank you.

    I want to install my office small business 2003 on my new laptop but can't find the installation cd.  I have all the license information.  Can Microsoft help me to make it work on the new laptop?  Thank you.

    http://support.Microsoft.com/default.aspx/KB/326246

    'How to replace Microsoft software or hardware, order service packs and upgrades, and replace product manuals'

    See you soon. Mick Murphy - Microsoft partner

  • Try to install Service Pack 2 for Windows Vista and it says this "one or more system components that require the service pack are missing" need help?

    Try to install Service Pack 2 for Windows Vista and it says this "one or more system components that require the service pack are missing" need help?

    Hi, Mksethompson,

    What is your model of computer?

    Error message when you try to install Windows Vista Service Pack 2: "one or more system components that require the service pack are missing."

    http://support.Microsoft.com/kb/968279

    Dell issue

    http://en.community.Dell.com/support-forums/software-OS/f/3524/t/19278096.aspx

  • I have a problem, try to uninstall the ask toolbar. get the error message: cannot access the VB script... need help please

    I have a problem, try to uninstall the ask toolbar. get the error message: unable to access the VB script... need help

    Hello

    How do you try to uninstall the toolbar?

    I would suggest trying the following methods and check if it helps.

    Method 1:

    Try the steps in the following Microsoft article and check if it helps.

    How to fix script errors in Internet Explorer on Windows computers:

    http://support.Microsoft.com/kb/308260

    Correction of errors in Internet Explorer: http://support.microsoft.com/kb/822521

    Method 2:

    Try to uninstall the toolbar, programs and features and check if it helps.

    Uninstall or change a program:

    http://Windows.Microsoft.com/en-us/Windows-Vista/uninstall-or-change-a-program

    Hope the information is useful.

  • Bought Lightroom CC for 2 devices.  One installed fine but can not get the LIBRARY to work on the 2nd unit.  2nd camera, it is the menu bar, but nothing other than a gray screen, 1 device has all the tools.  If anyone can help.

    Bought Lightroom CC for 2 devices.  One installed fine but can not get the LIBRARY to work on the 2nd unit.  2nd camera, it is the menu bar, but nothing other than a gray screen, 1 device has all the tools.  If anyone can help.

    Thanks Tanuj,

    After reloading the software it seems to work now.

  • Have renewed my subscription ExportPDF, but still pop up with window 'your course has expir├⌐' when will convert via the printer driver window. Comments / help welcome thanks :-)

    Have renewed my subscription ExportPDF, have the confirmation e-mail, but still up pop with window 'your course has expiré' when will convert via the printer driver window. Comments / help welcome thanks :-)

    Hi azza675,

    ExportPDF converts PDF files to Word and Excel formats (and many others). What you describe, sounds like you are trying to convert a file * to * PDF. Have you ever started a trial of Acrobat, maybe? (So that you can create PDFs with Acrobat, ExportPDF don't allow you to convert files to PDF.)

    What happens when you connect directly to ExportPDF to https://cloud.acrobat.com/exportpdf?

    Best,

    Sara

  • Change color of the annotation of link before...

    Dear all,

    Can anyone know how to change a forecolor of the annotation of specific link through SDK.

    normally the links in a PDF are represented in blue with an underline... now I need to change the style of all the links in the PDF file

    Use PDAnnot to extract the link annotation after extraction is trying to use the PDAnnotationSetColor function, but am not able to see the color change that reflected in the document.

    Help, please

    The respect of

    Amith Sai

    fillColor

  • Move the user off the system disk folders? Envy of all the data on E, so need to move directories user E. not individually, but in the world. If all new users, I create will have their user and docs folder on E.

    Got a new laptop with win 7 home premium pre-installed. Using the language of win 7... I have decreased the volume of HDD to 55 GB.  Made new simple volumes. I want all the data personal on E, so need to move user directories to E. No individually change the location tab on dozens of files, but in the world. If all new users, I create will have their user and docs folder on E from the gitgo.

    Under XP, I could just change the 'My Documents' link on each desktop, go to the e. * instead of c *. *, but with win7?

    As a Windows Home Server and most wise OS facilities, the system drive is isolated and a drive of 2 or 3 for everything else.  Get a problem? Just restore the system drive.

    You need the answer?

    Thank you
    Tom
    PS Microsoft: This backup/do imaging software, why don't we name the image so many can all be stored on easily in one place without having to go and rename it or move them elsewhere?

    Hello TomZork,

    Thanks for posting on the Microsoft answers Forum.

    In another forum, I found the instructions to move folders of users to another drive.
    You can follow the post here. This is attributed to Jimmie R. Houts.

    Article:
    You can move the entire folder C:\Users to another drive quite easily once windows is installed:

    1. Boot from the installation media and access the command prompt (I think you need to click on fix everything first)
    2. Use Robocopy to copy C:\Users to D:\Users: robocopy c:\Users d:\Users /mir /xj
      a. /mir says robocopy to mirror directories, this will copy all files and permissions
      b. /xj is very important, it means robocopy does not follow the points of junction. If you forget this, you will have a lot of trouble.
    3. Make sure that the files copied successfully
    4. Delete c:\Users
    5. Create the junction pointing d:\Users: mklink /d c:\Users d:\Users

    That's all. I used this process for Vista RTM with no problems.

    Here's an article that explains as well. Just use robocopy instead of xcopy as it does in the article in order to avoid possible ntfs permissions problems.

    Update: because I discovered the hard way, I thought I would mention also that if you plan on switching "Program Data", or "Program Files" with this method, you will be disappointed to know that everything works as expected, but the windows updates will install is no longer. I don't know if this problem has been fixed in Win 7.

    With the foregoing, it is not a Microsoft forum or Web site so you will have to use at your own risk. I also recommend to do a system restore point before making any changes in directories that you can then go back to a previous state.

    Please reply back and let us know if these suggestions help you to solve your problem, then to benefit others.

    Sincerely,

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Wikibrowser installed on my computer and converted all the docs in wiki. How to convert to PDF

    Wikibrowser installed on my computer and converted all my PDF docs in Wiki format. I want to delete my computer Wikibrowser, but do need to be sure I will not lose access to the documents. How can I convert documents to PDF?

    OK, the documents are not actually changed, not at all.

    What happens is that under Windows, you can choose which application opens a type of file when you double-click. (You can do yourself by right click, open with...). When you choose the application, all files take this icon. The files don't change, just the icon. In this case, the Wikibrowser tells Windows that it will open all your PDF documents, so changed the icon.

    But get rid of this malware as soon as you can. One of my friends had this and other things and kept just malware download and install more malware. In the end, she had something more than 4,000 to get rid of!

  • See all THE files that links to a file?

    I wonder if it is possible to choose a file (say "test_photo.jpg" image) and ALL the other files that the image is linked to see. If ideally I would choose "test_photo.jpg" and somewhere, he would show me that "test_photo.jpg" is used as a link 'brochure_layout.indd', 'business_card.ai' and 'postcard.indd'.

    This could be in Adobe Bridge, in the meta data in another program, anything really. I just want to know if this information is stored somewhere on the computer?

    I know that the bridge can select an InDesign file & tell you what are the links; but it's not the information I'm looking for; again, it is more for the image files to see ALL the different files that link to him.

    Hope someone has an idea if it exists.

    Thank you!

    TIA

    N °

Maybe you are looking for

  • iBooks does only not on iPad

    The iBooks on my iPad app has stopped working. I can see my books. I can't get. None of the icons at the bottom of the page works except "my books".

  • Mail becomes incredibly slow, but only if I download attachments

    Mail becomes incredibly slow, but only if I download attachments (photos, files pdf, etc] This has happened a lot lately. If I get a message with, say, some photos attached Works Mail very well. However, if I can download files attached to my iMac ma

  • HP Envy J100: PRODUCT KEY MS Office 2013

    where can I get the PRODUCT KEY for my pre installed MS Office 2013? Cannot find sticker package.

  • HP Envery Phoenix 810: New PC, added my own SSD, how to move Windows?

    Hello Just got this new PC, but it did not come with an SSD, so I added my own. But I can't understand how to get Windows installs it. I want it to become my main boot drive. Delivery to zero/system restore does not give me an option to specify a dri

  • DRM with Overdrive Media Console error message

    I have a HP pavilion dv5230ca laptop, under XP (SP3) with Wi - Fi and purchased in August 2006.  I would like to listen to audio books through our online library.  To do this, I downloaded the Overdrive Media Console application that is required.  Wh