1 31 package org.pdfbox.pdmodel.fdf; 32 33 import org.pdfbox.cos.COSBase; 34 import org.pdfbox.cos.COSDictionary; 35 import org.pdfbox.cos.COSInteger; 36 import org.pdfbox.cos.COSNumber; 37 38 import org.pdfbox.pdmodel.common.COSObjectable; 39 40 46 public class FDFAnnotation implements COSObjectable 47 { 48 private COSDictionary annot; 49 50 53 public FDFAnnotation() 54 { 55 annot = new COSDictionary(); 56 } 57 58 63 public FDFAnnotation( COSDictionary a ) 64 { 65 annot = a; 66 } 67 68 73 public COSBase getCOSObject() 74 { 75 return annot; 76 } 77 78 83 public COSDictionary getCOSDictionary() 84 { 85 return annot; 86 } 87 88 93 public Integer getPage() 94 { 95 Integer retval = null; 96 COSNumber page = (COSNumber)annot.getDictionaryObject( "Page" ); 97 if( page != null ) 98 { 99 retval = new Integer ( page.intValue() ); 100 } 101 return retval; 102 } 103 104 109 public void setPage( int page ) 110 { 111 annot.setItem( "Page", new COSInteger( page ) ); 112 } 113 114 } | Popular Tags |