1 31 package org.pdfbox.pdmodel.interactive.documentnavigation.destination; 32 33 import org.pdfbox.cos.COSArray; 34 import org.pdfbox.cos.COSBase; 35 36 43 public class PDPageFitHeightDestination extends PDPageDestination 44 { 45 48 protected static final String TYPE = "FitV"; 49 52 protected static final String TYPE_BOUNDED = "FitBV"; 53 54 58 public PDPageFitHeightDestination() 59 { 60 super(); 61 array.growToSize(3); 62 array.setName( 1, TYPE ); 63 64 } 65 66 71 public PDPageFitHeightDestination( COSArray arr ) 72 { 73 super( arr ); 74 } 75 76 82 public int getLeft() 83 { 84 return array.getInt( 2 ); 85 } 86 87 92 public void setLeft( int x ) 93 { 94 array.growToSize( 3 ); 95 if( x == -1 ) 96 { 97 array.set( 2, (COSBase)null ); 98 } 99 else 100 { 101 array.setInt( 2, x ); 102 } 103 } 104 105 110 public boolean fitBoundingBox() 111 { 112 return TYPE_BOUNDED.equals( array.getName( 1 ) ); 113 } 114 115 120 public void setFitBoundingBox( boolean fitBoundingBox ) 121 { 122 array.growToSize( 2 ); 123 if( fitBoundingBox ) 124 { 125 array.setName( 1, TYPE_BOUNDED ); 126 } 127 else 128 { 129 array.setName( 1, TYPE ); 130 } 131 } 132 } 133 | Popular Tags |