1 31 package org.pdfbox.pdmodel.fdf; 32 33 import java.io.IOException ; 34 35 import org.pdfbox.cos.COSBase; 36 import org.pdfbox.cos.COSDictionary; 37 38 import org.pdfbox.pdmodel.common.COSObjectable; 39 40 import org.pdfbox.pdmodel.common.filespecification.PDFileSpecification; 41 42 48 public class FDFNamedPageReference implements COSObjectable 49 { 50 private COSDictionary ref; 51 52 55 public FDFNamedPageReference() 56 { 57 ref = new COSDictionary(); 58 } 59 60 65 public FDFNamedPageReference( COSDictionary r ) 66 { 67 ref = r; 68 } 69 70 75 public COSBase getCOSObject() 76 { 77 return ref; 78 } 79 80 85 public COSDictionary getCOSDictionary() 86 { 87 return ref; 88 } 89 90 95 public String getName() 96 { 97 return ref.getString( "Name" ); 98 } 99 100 105 public void setName( String name ) 106 { 107 ref.setString( "Name", name ); 108 } 109 110 117 public PDFileSpecification getFileSpecification() throws IOException 118 { 119 return PDFileSpecification.createFS( ref.getDictionaryObject( "F" ) ); 120 } 121 122 127 public void setFileSpecification( PDFileSpecification fs ) 128 { 129 ref.setItem( "F", fs ); 130 } 131 } | Popular Tags |