I have PDF documents with Links which point to sections referenced (e.g. link of text "Section 2.2" points to the actual page number of "Section 2.2"), but as the links are created from cross-references during rendition from Word to PDF, there are cases that the destination page number and source page number of the links are the same (e.g. links of text "Section 2.2" on page 9 are created with the destination of page 9 which is the actual page number of "Section 2.2"), I want to remove all these links, but I don't know how to get the destination page number by JavaScript, could you check me codes below and advise? Your help is really appreciated!
for (var i = 0; i < this.numPages; i++)
{
var box = this.getPageBox("Crop", i);
var linksofOnePage = this.getLinks(i, box);
for (var j = 0; j< linksofOnePage.length; j++)
{
if linksofOnePage[j]...
{
this.removeLinks(i,linksofOnePage[j].rect);
}
}
}
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com