Copy link to clipboard
Copied
I want extract hyperlink from PDF
Does Acrobat SDK support extract hyperlink from PDF file?
Or
Exist Library support .Net?
Please give me a advice.
Thanks.
Copy link to clipboard
Copied
By "extract" you mean you want a kind of report? A plugin in C++ could do this. No library, no C#.
Copy link to clipboard
Copied
This code get type of annotation is link:
//Get each annotation on the page
for (i2 = 0; i2 < PDPageGetNumAnnots(pdPage); i2++) {
//Get a specific annotation
annot = PDPageGetAnnot(pdPage,i2);
if (PDAnnotIsValid(annot)){
//Display subtype information about the annotation
atom = PDAnnotGetSubtype(annot);
//Cast the ASAtom object to a character pointer
ptr = (char*) ASAtomGetString(atom);
sprintf(buf, "The annotation’s subtype is %s", ptr);
AVAlertNote (buf);
}
}
How can get link name ( ex: https://forums.adobe.com/ )?
Copy link to clipboard
Copied
1. Study the PDF Reference to see the relationship between actions and annotations. There are many types of action, and you seem to be interested in only one type; but you need to check whether there is an action and its type. There are also "additional actions" you can probably ignore for your purposes.
2. See whether you can use PDAction methods to get the information you need. This will be easier than 3.
3. If a the PDAction methods do not give enough information, you need to use the Cos layer; this will require the detailed knowledge from 1.
Copy link to clipboard
Copied
One more point: please bear in mind that Acrobat, Reader and some other PDF viewers will create additional links that are not a part of the PDF content, by analysing the page contents. In particular, if a valid URL is seen, there may be a link to it. The rules for this are undocumented, and the PDF does not change; you cannot discover programmatically what has been done.
Copy link to clipboard
Copied
Can you give me function name ?
Copy link to clipboard
Copied
No.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now