Solved

Printing Bookmarks

Posted on 2010-09-09
5
1,083 Views
Last Modified: 2012-05-10
Is it possible to print a list only of the bookmarks in Adobe Acrobat 9 Standard version?
0
Comment
Question by:pruski
  • 3
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 33645033
You can do this with Javascript - however, Standard does not come with the JS development environment, so you have to write the code without having a way to debug. Even though Standard does not come with the JS development tools, it still can run JS commands.
Have you ever done anything with Javascript in Acrobat?


0
 

Author Comment

by:pruski
ID: 33648303
Thanks for the response.  I have never done anything with Java in Acrobat.  Any pointers will be greatly appreciated!
0
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 500 total points
ID: 33651801
I'm leaving for the weekend, I will be back on Tuesday with a sample JavaScript.
0
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 500 total points
ID: 33694093
Sorry for the delay.

Save the attached Javascript program as a text file in the Acrobat Javascript directory (I'm assuming that you are using Windows) C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Javascripts (if you are not using A9, adjust the path). Use a descriptive file name with the extension .js (e.g. dumpBookmarks.js). Then restart Acrobat. You should now have a new menu item under the Documents menu. If it does not show up, you may have to go into Acrobat's preferences and enable the "Enable menu item JavasScript execution privileges" in the JavaScript category.
function DumpBookmark(rep, bkm, nLevel)
 {
    if (DBM_line >= 50)
    {
        rep.breakPage();
        DBM_line = 0;
    }

    rep.indent(20*nLevel);
    rep.writeText("+-" + bkm.name);
    rep.outdent(20*nLevel);

    DBM_line++;

    if (bkm.children != null)
    for (var i = 0; i < bkm.children.length; i++)
    DumpBookmark(rep, bkm.children[i], nLevel + 1);
}

function doDumpBookmarks()
 {
    // Open a new report
    var rep = new Report();

    rep.size = 1.2;
    rep.color = color.blue;

    rep.writeText("Summary of Bookmarks:");

	rep.size = 1.0;
	rep.color = color.black;
	
    DumpBookmark(rep, this.bookmarkRoot, 0);

    // Now open the report
    var docRep = rep.open("myreport.pdf");
    docRep.info.Title = "Bookmarks Summary";

    DBM_line = 0;
}

var DBM_line = 0;

// add the menu item
app.addMenuItem({
	cName: "dumpBookmarksToReport",     // this is the internal name used for this menu item
	cUser: "Dump Bookmarks",       // this is the label that is used to display the menu item
	cParent: "Document",              // this is the parent menu. The file menu would use "File"
	cExec: "doDumpBookmarks()",  // this is the JavaScript code to execute when this menu item is selected
	cEnable: "event.rc = (event.target != null);",       // when should this menu item be active?
	nPos: 0
});

Open in new window

0
 

Author Comment

by:pruski
ID: 33725288
Thanks very much.  I will give the script a try.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Acrobat 8 on Windows 2008 R2 Terminal Server requires admin rights 5 260
Access 2010 and fillable PDF forms 4 85
Adobe Indesign CS6 4 131
How to open a zip file 4 100
This article focuses on how to remove password security from multiple PDF files by Adobe Acrobat program. Sometimes it is essential to access the stored data items and to print, edit as well as copy content from Portable Document Format files in abs…
PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question