1 31 package org.pdfbox.pdmodel.interactive.documentnavigation.destination; 32 33 import org.pdfbox.cos.COSArray; 34 35 42 public class PDPageFitDestination extends PDPageDestination 43 { 44 47 protected static final String TYPE = "Fit"; 48 51 protected static final String TYPE_BOUNDED = "FitB"; 52 53 57 public PDPageFitDestination() 58 { 59 super(); 60 array.growToSize(2); 61 array.setName( 1, TYPE ); 62 63 } 64 65 70 public PDPageFitDestination( COSArray arr ) 71 { 72 super( arr ); 73 } 74 75 80 public boolean fitBoundingBox() 81 { 82 return TYPE_BOUNDED.equals( array.getName( 1 ) ); 83 } 84 85 90 public void setFitBoundingBox( boolean fitBoundingBox ) 91 { 92 array.growToSize( 2 ); 93 if( fitBoundingBox ) 94 { 95 array.setName( 1, TYPE_BOUNDED ); 96 } 97 else 98 { 99 array.setName( 1, TYPE ); 100 } 101 } 102 } 103 | Popular Tags |