These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Adobe Pro extended - list of Bookmarks

Claudia
Registered: May 27 2009
Posts: 10
Answered

I tried to put the list of Bookmarks in the Batch Sequence in Adobe 8 professional and it works perfect! but when i tried to do it in adobe 9 pro extended it does not work, can somebody help me to figure out what i steps i need to get it working??????????????

My Product Information:
Acrobat Pro Extended 9.0, Windows
daka630
Expert
Registered: Mar 1 2007
Posts: 1420
fwiw,
Just ran List all Bookmarks.sequ with Acrobat 9 Professional Extended.
Used the "Acrobat 8.1" file.
An output PDF with the bookmarks listed was provided.


Check the location of the *.sequ file.
XP
/C/Documents and Settings//Application Data/Adobe/Acrobat//Sequences
Vista
/C/Users/daka630/AppData/Roaming/Adobe/Acrobat/9.0/Sequences

Perhaps replacing the file will resolve the issue.
Extract the *.sequ file from the batchseq.zip file and use this to replace what is in the user location.
If needed, the documentation and zip file are at:
[url]http://www.adobe.com/devnet/acrobat/?view=documentation[/url]

Be well...

Be well...

Claudia
Registered: May 27 2009
Posts: 10
Thank you so much!! it actually did work but i have another problem.......
It only prints the 1st page and that is it!!!!
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
Are all the bookmarks listed on the page?

Are you getting any error messages in the Acrobat JavaScript debugging console?

Have you uncommented:

// Make it global so the object will be "remembered" after batch is done.
global.bmRep = bmReport;
// Make global for next step

For the JavaScirpt API I obtain a 15 page report.

George Kaiser

daka630
Expert
Registered: Mar 1 2007
Posts: 1420
Hi George,
Glad your *here*.
After reading Claudia's follow up post I ran two trials with the "default" List All Bookmarks sequence.
#1 In XP, Acrobat 3D (8.1.5)
#2 In Vista, Acrobat 9 Professional Extended (9.1.1)
Both trials done on same PDF. 406 pages. From 4 PDFs combined into one with Acrobat 3D.
The source PDF is "heavy" with bookmarks.
Trial #1 output was a 6 page PDF containing all the bookmarks that are in the source PDF.
Trial #2 output was a 1 page PDF containing some of the bookmarks (those that fit on 1 page).
Below is the "default" js used in the Batch Sequence available from Adobe.
Note that both the batch sequence document file (PDF) and the sample files in the available zip file
are still those from Acrobat 8. As of yesterday, nothing labeled as "Acrobat 9" is available.
Perhaps the js below needs an "adjustment" to function in Acrobat 9?

Any comments from the "js crew" would be welcomed .
Quote:
/* List all Bookmarks */
/* Recursively work through bookmark tree */
function PrintBookmarks(bm, nLevel)
{
if (nLevel != 0) { // don't print the root
bmReport.absIndent=bmTab*(nLevel-1);
bmReport.writeText(util.printf("%s",bm.name));
}
if (bm.children != null)
for (var i = 0; i < bm.children.length; i++)
PrintBookmarks(bm.children[i], nLevel + 1);
}
bmTab = 20;
bmReport = new Report();
bmReport.size = 2;
bmReport.writeText(this.title);
bmReport.writeText(" ");
bmReport.size = 1.5;
bmReport.writeText("Listing of Bookmarks");
bmReport.writeText(" ");
bmReport.size = 1;
PrintBookmarks(this.bookmarkRoot, 0);
global.bmRep = bmReport; // make global
if ( app.viewerVersion < 7 ) {
global.wrtDoc = app.setInterval(
'try {'
+' reportDoc = global.bmRep.open("Listing of Bookmarks");'
+' console.println("Executed Report.open");'
+' app.clearInterval(global.wrtDoc);'
+' delete global.wrtDoc;'
+' console.println("Executed App.clearInterval");'
+' reportDoc.info.title = "Bookmark Listings";'
+' reportDoc.info.Author = "A. C. Robat";'
+'} catch (e) {console.println("Waiting...: " + e);}'
, 100);
} else {
reportDoc = global.bmRep.open("Listing of Bookmarks");
console.println("Executed Report.open");
reportDoc.info.title = "Bookmark Listings";
reportDoc.info.Author = "A. C. Robat";
}
Be well...

Be well...

try67
Expert
Registered: Oct 30 2008
Posts: 2398
There's a bug in the Report object in Acrobat 9. Basically it fails to spawn a new page when reaching the end of the first one. The way to overcome it is to create a variable that holds the number of lines printed, and when it reaches a certain number (depending on font size), add a new page to the report.
That should solve it.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

daka630
Expert
Registered: Mar 1 2007
Posts: 1420
try67,
Thank you!

Be well...

Be well...

FJSDCDA
Registered: May 6 2009
Posts: 2
Sounds perfect, but I don't know how to "create a variable that holds the number of lines printed, and when it reaches a certain number (depending on font size), add a new page to the report." Could anyone be more specific? I see the standard batch script posted by daka630. Is there a specific modification people can suggest or have succeeded with?

Thanks,

FJ

try67 wrote:
There's a bug in the Report object in Acrobat 9. Basically it fails to spawn a new page when reaching the end of the first one. The way to overcome it is to create a variable that holds the number of lines printed, and when it reaches a certain number (depending on font size), add a new page to the report.
That should solve it.
paularae
Registered: Sep 17 2007
Posts: 13
Has anyone been able to update the V8 batch sequence for Acrobat V9, to list all the bookmarks to create a variable that holds the number of lines printed, and when it reaches a certain number (depending on font size), add a new page to the report? How do I modify this script?
(Please do not respond if you are trying to simply sell me your information.)


/* List all Bookmarks */
/* Recursively work through bookmark tree */
function PrintBookmarks(bm, nLevel)
{
if (nLevel != 0) { // don't print the root
bmReport.absIndent=bmTab*(nLevel-1);
bmReport.writeText(util.printf("%s",bm.name));
}
if (bm.children != null)
for (var i = 0; i < bm.children.length; i++)
PrintBookmarks(bm.children[i], nLevel + 1);
}
bmTab = 20;
bmReport = new Report();
bmReport.size = 2;
bmReport.writeText(this.title);
bmReport.writeText(" ");
bmReport.size = 1.5;
bmReport.writeText("Listing of Bookmarks");
bmReport.writeText(" ");
bmReport.size = 1;
PrintBookmarks(this.bookmarkRoot, 0);
global.bmRep = bmReport; // make global
if ( app.viewerVersion < 7 ) {
global.wrtDoc = app.setInterval(
'try {'
+' reportDoc = global.bmRep.open("Listing of Bookmarks");'
+' console.println("Executed Report.open");'
+' app.clearInterval(global.wrtDoc);'
+' delete global.wrtDoc;'
+' console.println("Executed App.clearInterval");'
+' reportDoc.info.title = "Bookmark Listings";'
+' reportDoc.info.Author = "A. C. Robat";'
+'} catch (e) {console.println("Waiting...: " + e);}'
, 100);
} else {
reportDoc = global.bmRep.open("Listing of Bookmarks");
console.println("Executed Report.open");
reportDoc.info.title = "Bookmark Listings";
reportDoc.info.Author = "A. C. Robat";
}