Add bookmarks to all pdf files at once using javascript or apple script

Hello
I have a folder containing pdf files of a survey.
There is also a 'surveyname.pdf' file which consists of a number of pages.
These pages have to be bookmarked for easy reference.There is a 'dummy.pdf' file which has all the bookmarks of the survey pages. I am using Adobe Acrobat 7.0 to open this file.
There are also some map pdf's in the same folder.
How can I add the bookmarks that are in the 'dummy.pdf' file to all the other pdf files in the same folder at once instead of doing one at a time which consumes a lot of time for 100-120 files?
I use extendscript toolkit for writing the javscript or applescript code.
I would be grateful if anyone could help me in solving this.
Thankyou
Krishna

Here are some examples of doing the insert and the save in a separate operation. You can put them together on your own.
~T
//From the JS Reference:
this.insertPages ({
nPage: -1,
cPath: "/c/temp/myCoverPage.pdf",
nStart: 0
//Example of a trustedFunction SaveAs
mySaveAs = app.trustedFunction(function (cPath)
app.beginPriv();
this.saveAs(cPath);
app.endPriv();
app.addMenuItem({ cName: "mySaveAs", cParent: "Insert Page",
cExec: "mySaveAs('/c/myFolder/myNewPDF.pdf')",
cEnable: "event.rc = (event.target != null);",
nPos: 0

Similar Messages

  • How to export book pdf using custom presets for all book files in indesign using javascript

    How to export book pdf using custom presets for all book files in indesign using javascript.

    Hi jackkistens,
    Try the below js code.
    Note: you can change your preset name in below (e.g, Your preset name).
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "Your preset name", myBook.bookContents, "Book_PDF", false);
    example:
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "[High Quality Print]", myBook.bookContents, "Book_PDF", false);
    thx,
    csm_phil

  • How can I print multiple PDF files at once using Windows 7?

    How can I print multiple PDF files at once, on an HP LJ Pro 400 xcolocr printer without opening each
    one separately using Windows 7?

    I am sorry, but to get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial printer. You can do this at http://h30499.www3.hp.com/hpeb/
    I hope this helps.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Is it possible to add bookmarks to a PDF file with Adobe Reader for iOS?

    In the App Store write-up on this app, it said that one could "Use bookmarks to jump directly to a section in your PDF file."  But I don't see how one can add such bookmarks.  Do they only mean that you can use bookmarks that were already in the document before you open it in Adobe Reader?

    Dennis (or any Adobe rep),
    Any updates to the OP's question? I'm with a large government agency, and we're moving away from GoodReader for reasons I can't go into here, and the ability to add user-defined bookmarks within the app is a mandatory feature for the document reader we select. I have the latest version of Adobe Reader (11.6.1) installed on my government iPad, and the ability to add user-defined bookmarks still seems to be missing. Does Adobe have any plans to add this feature, or is it already present and I'm simply overlooking it?
    Thanks,
    Cam

  • How to edit all PDF files at once

    Hey there,
    I am a student and have to print all the slides from the lectures. However, the slides have this huge blue block on the top that I would like to remove because it needs a lot of ink. After that, I have to make the font black. My problem is that I do not want to do this procedure with every single slide. Is there a way to do it for all at once?
    I used to convert the PDF file into a PPT file and removed the background. However, if you convert a PDF file that contains functions or equations, the PPT-file won't show them in the right way.
    Thank you!

    Hi,
    If the Header section remains to be same for all PDFs then you can create an Action to crop it from all PDF.
    Regards,
    Anoop

  • Get all .pdf file in a folder and do shell script

    Hi, I need to convert many pdf to ps using pdf2ps, and I'm try to do this with applescript:
    tell application "Finder"
    set pdf_folder to (choose folder)
    set pdf_path to POSIX path of (item of folder pdf_folder whose name...)
    end tell
    repeat with k in pdf_path
    set kl to ... -- same of k but with extension .ps
    do shell script ("pdf2ps "&k&" "&kl)
    end repeat
    but I don't know how implement that.
    Can anyone help me?
    Thanks!

    01. The 'tell application "Finder" ... end tell' code block is not required to call 'choose folder'. View the 'Standard Additions' dirctionary.
    02. 'choose folder' returns a single alias - if only a single folder is to be selected, or a list of 'alias'es - if 'multiple selection allowed' is set to true.
    03. 'pdf2ps' is not part of Apples' UNIX commands installation; and you did not provide a valid URL for others to download the UNIX command.
    Code to process only a single selected folder.
    -- Code starts here --
    try
    do shell script ("pdf2ps " & (quoted form of (POSIX path of ((choose folder) as string))))
    end try
    -- Code ends here --
    Code to process multiple selected folders.
    -- Code starts here --
    set pFolder to choose folder with multiple selections allowed
    if ((count pFolder) > 1) then
    set {oAStid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ""}
    set pFolder to text items of pFolder
    repeat with i from 1 to (count pFolder)
    set (item i of pFolder) to quoted form of (POSIX path of (item i of pFolder))
    end repeat
    set AppleScript's text item delimiters to " "
    set pFolder to pFolder as string
    set AppleScript's text item delimiters to oAStid
    else
    set pFolder to pFolder as string
    end if
    try
    do shell script ("pdf2ps " & pFolder)
    end
    -- Code ends here --

  • Expand/Collapse all the Bookmarks in a PDF file

    Hi,
    This is my first message on the board :-)
    I work with very large PDF files (i.e 2000 pages, 700 bookmarks on 5 or 6 levels!) and I'm looking for a script (Acrobat 9 Pro) allowing to expand/collapse all the bookmarks in a PDF file.
    Thanks in advance for your valuable help,
    Cheers
    Antonella

    The Acrobat Javascript Scripting reference (http://partners.adobe.com/public/developer/en/acrobat/sdk/AcroJS.pdf) describes how to use scripting to access bookmarks and how to open and close them, which is what you're looking for.
    I suggest you read the reference and make a function that will do the job for you.
    That's the way I would do it.
    I don't think you can access the keyboard shortcuts "/" and "Shift + *" via scripting.
    Torben.

  • Bug in Preview in Snow Leopard when opening multiple pdf files at once

    I receive 50-200 pdf files by e-mail each day. I have historically saved the pdf attachments to a folder, then selected all the pdf files in the folder (CMD A), then opened all the selected files in Preview (CMD O). After updating to Snow Leopard, downloading 34 pdf files to a folder, selecting them all, then attempting to open them all in Preview (using both CMD O, then File/Open, then File/Open With), the effort first opens 6 of the 34 files. Closing all then trying again results in 7 files being opened, closing all then trying again results in 8 files being opened, etc etc. Earlier today I had the same results, but eventually got a message asking if I wanted to open all in separate windows (I did) or a single window, and it opened all the files at once as I wanted. After shutting down, moving home, and receiving additional pdf files, however, back to the same open 5, then open 6, etc. problem. Anyone else having this problem or a suggestion on how to resolve?
    Thanks for suggestions,
    B

    More info - apparently the bug isn't related to Preview, but to the attempt to open all pdf files in the folder with ANY program. After having Preview open 25 of the 34 files I was attempting to open, I then tried opening all 34 with Adobe Reader. It opened 26 (after Preview had opened 25). Tried again with Preview - it opened 27, then 28 with Adobe Reader. It doesn't necessarily open the FIRST 25 (or 26, etc) either, so it's difficult to work with the open ones, then go back and work with the remaining ones later.

  • I have an iPad 2 with iOS 5.1 and iBooks version 2.1.1. I have 64GB of storage, 80% is used. iBooks is using 250MB of storage. I have a large number of PDF files in my iBooks library. At this time I can not add another book or PDF file to my library.

    I have an iPad 2 with iOS 5.1 and iBooks version 2.1.1. I have 64GB of storage, 80% is used. iBooks is using 250MB of storage. I have a large number of PDF files in my iBooks library. At this time I can not add another book or PDF file to my library.  When I try to move a PDF file to iBooks the system works for a while...sometimes the file appears and than disappears....sometimes the file never appears. Is ther some limit to the number of books or total storage used in IBooks?  Thanks....

    Hi jybravo70, 
    Welcome to the Apple Support Communities!
    It sounds like you may be experiencing issues on your non iOS 8 devices because iOS 8 is required to set up or join a Family Sharing group.
    The following information is located in the print at the bottom of the article. 
    Apple - iCloud - Family Sharing
    Family Sharing requires a personal Apple ID signed in to iCloud and iTunes. Music, movies, TV shows, and books can be downloaded on up to 10 devices per account, five of which can be computers. iOS 8 and OS X Yosemite are required to set up or join a Family Sharing group and are recommended for full functionality. Not all content is eligible for Family Sharing.
    Have a great day, 
    Joe

  • How to programmatically add rectangle to a pdf file ?

    How to programmatically add rectangle to a pdf file ?
    There is several page pdfs, non-vector, black and white.
    Users are color blind and have disabilities.
    To train them, one adds a rectangle at a certain lower-left point and width,height specified for a page.
    The idea is to give the script the page and coordinates and size of rectangle to be added programmatically. Green rectangles are acceptable as the cones are most sensitive there.
    Also, additional feature to add bookmarks on the left in the order these rectangle data is provided to the script.
    The script could be "hard-wired" by a list of the rectangle coodinates, and page number, pasted inside acrobat and run or entered into acrobat in some way.
    Your script would help many disabled people who are distributed through out the world.
    Feel free to contact me by email if you wish.
    Dying Vets

    P.S.
    This rectangle does not have to be a full annotation rectangle which needs user,date and a lot of info.
    Something minimal like this would suffice
    1 0 0 RG % red for stroke color
    200 300 50 75 re
    As you can see that the native unit of the pdf file is the "point" having 72 in an inch.
    The file dpi would be given. However, one could assume that pixel for the rectangle lower-left and width/height are given.
    From the pixels and dpi, the points could be calculated if desired.

  • Can not open all .pdf files in Yahoo Mail.

    Three computers using Windows XP and Internet Explorer can open all .pdf files in Yahoo
    Mail. The fourth and newest Computer with XP Pro, Internet Explorer, and the latest Adobe
    Reader can only open some, but not all, .pdf files in Yahoo Mail. Nothing happens when
    the window is clicked to open file. How can this be fixed?

    Adobe Reader isn't my favorite, but neither are smug and uninformed assertions about Preview. There are PDFs that render only squares and marks under Preview (http://apple.stackexchange.com/questions/24209/this-pdf-displays-with-question-m arks-instead-of-letters), which is a common problem in MS Windows Office generated PDFs, so you may actually need Adobe Reader for Mac.
    If you need to use Adobe Reader (as I do), then it may depend on the filesystem type where you save your PDF.  For example, our Macs are network homed.  Saving to desktop produced the error reported above no matter whether I used Safari:Save As, or the PDF save icon. 
    However, when I saved to a local drive (such as /tmp), then it worked.  I don't know why file system makes a difference, unless Adobe is doing something with extended attributes that doesn't get written correctly to some filesystems.
    Hope this helps.

  • Why am I unable to open multiple PDF files at once?

    I'm trying to open and view 28 PDF files, but am unable to do so.  I have recently upgraded my computer and am now using Windows 7 with 12 GB of RAM.  On my older system I was able to open this many PDF files at once, but now I am not able to do so.  I can selects and open about 10 PDF files, but when I choose more than that and right-click on the files I do not get an option to open the files.  Any help is greatly appreciated.

    Select 10 files and open the files, then select and open the next 10 files.

  • How to search for text inside multiple pdf file at once in ipad

    Hi
    I am student and i need search a word or subject or sentences on my all pdf files,i have tested some applications like ibook, ipdf, addobe reader, good reader ,....  But couldn't find what i need to have.
    Please kindly help me to find the best application.
    Thanks

    I found an article, that claims PDF Expert does exactly what you are asking.
    Article: http://www.imore.com/pdf-expert-ipad-brings-full-text-search-pdf-library
    PDF Expert: https://itunes.apple.com/us/app/pdf-expert-fill-forms-annotate/id393316844?mt=8

  • Reader 9.3 produces Runtime error for all .pdf files on hard drive and email

    Does anyone have a resource that can show me how to eliminate a runtime error with Reader 9.3.1, Windows XP w/ SP3 and IE7. I have recently had all .pdf files located on my hard drive and in emails refuse to open because of this message:
    "Runtime Error!
    Program C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe
    This application has requested the Runtime to terminate it in an unusual way.  Please contact the application's support team for more information."
    So far, I have uninstalled and reinstalled Reader 9.3 from the website; added update 9.3.1 and tried to reopen files with no success.
    My organization sends a ton of .pdf files and it is not good when you can't open them for review and action.

    Hi All,
    Although I don't normally post in forums, I thought it prudent to lay this matther to rest.  I have tested the following solution:
    It appears that Adobe Reader likes to check access to each parent folder as well as the actual application data folder.  Apparantly there are other programs that also do similar things. As a result if you have your appdata redirected to \\server1\profiles\%username%\appdata adobe reader would first try directly access \\server1\profiles.  If the user does not have to Traverse folder permission, this fails. Typically you will need to change your permissions on you profile share from:
    -                   Users - Read Attributes (Apply to: This folder, subfolders and files)
    -                   Users - Read Extended Attributes (Apply to: This folder, subfolders and files)
    -                  Users - Create Folders/Append Data (Apply to: This folder, subfolders and files)
    -                   Users - Read Permissions (Apply to: This folder, subfolders and files)
    To the share permissions suggested by Microsoft in KB 274443:
    -                   Everyone - Create Folder/Append Data (Apply onto: This Folder Only)
    -                   Everyone - List Folder/Read Data (Apply onto: This Folder Only)
    -                   Everyone - Read Attributes (Apply onto: This Folder Only)
    -                   Everyone - Traverse Folder/Execute File (Apply onto: This Folder Only)
    Hopefully this helps everyone.

  • Q: How do I convert a pdf file to Word using Adobe Export PDF? - all my attempts are scrambled.

    Q: How do I convert a pdf file to Word using Acrobat Export PDF - all my attempts are scrambled

    Do you subscribe an Adobe Export PDF account? If you do not have an account, please go to https://www.acrobat.com/exportpdf/en/home.html?trackingid=JPZKN to subscribe.
    If you have an account, make sure verify your email address and sign in from https://exportpdf.acrobat.com/SignIn.html
    Jyh-Jiun Liou

Maybe you are looking for