//--------------------------------------------------------------------------------------- // Copyright (c) 2001-2008 by PDFTron Systems Inc. All Rights Reserved. // Consult legal.txt regarding legal and license information. //--------------------------------------------------------------------------------------- import pdftron.Common.PDFNetException; import pdftron.PDF.*; import pdftron.PDF.Annot.BorderStyle; import pdftron.SDF.SDFDoc; import pdftron.SDF.Obj; public class AnnotationTest { // Relative path to the folder containing test files. public static final String input_path = "../../TestFiles/"; static void AnnotationHighLevelAPI(PDFDoc doc) throws PDFNetException { // The following code snippet traverses all annotations in the document System.out.println("Traversing all annotations in the document..."); int page_num=1; for (PageIterator itr = doc.getPageIterator(); itr.hasNext();) { System.out.println("Page " + (page_num++) + ": "); Page page = (Page)(itr.next()); int num_annots = page.getNumAnnots(); for (int i=0; i