?
Solved

Printing Bookmarks

Posted on 2010-09-09
5
Medium Priority
?
1,097 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 2000 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 2000 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 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Acrobat’s JavaScript is a great tool to extend the application, or to automate recurring tasks. There are several ways a JavaScript can be added to the application or a document (e.g. folder level scripts, validation scripts, event handling scripts,…
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…
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Suggested Courses

770 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