I need to extratc all link image in a document and report a list of href.
My code only count the number of links on page but don't work completely.
May yuo help me?
Thanks!
var rep = new Report();
rep.size = 1.2;
rep.color = color.blue;
rep.writeText ("Testing for Content");
rep.writeText("FileName : " + this.documentFileName);
for (var i = 0; i < this.numPages; i++ ) // loop thru all pages
{
var a= this.getAnnots();
var c = this.getOCGs();
var b = this.getPageBox("Crop", i);
var aLinks = this.getLinks(i, b);
rep.indent(20);
for (l = 0; l < aLinks.length; l += 1)
{
rep.writeText((l+1) + " " + aLinks[l].name);
}
rep.writeText("Number of Links on page " + (i+1) +" is " + aLinks.length);
if (a != null ) rep.writeText("There are annotations on page " + (i+1));
if (c != null ) rep.writeText("There are layers in this document.")
}
var docRep = rep.open("myreport.pdf");
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com