【发布时间】:2021-02-21 23:42:55
【问题描述】:
【问题讨论】:
【问题讨论】:
List<PDAnnotation> annotations = page.getAnnotations();
for (PDAnnotation annotation : annotations)
{
PDAnnotation annot = annotation;
if (annot instanceof PDAnnotationLink)
{
PDAnnotationLink link = (PDAnnotationLink) annot;
PDAction action = link.getAction();
if (action instanceof PDActionURI)
{
PDActionURI uri = (PDActionURI) action;
if ("https://stackoverflow.com".equals(uri.getURI()))
{
annotations.remove(link);
break;
}
}
}
}
page.setAnnotations(annotations);
【讨论】: