public PDCcitt( PDDocument doc, RandomAccess raf ) throws IOException
{
super( new PDStream(doc),"tiff");
// super( new PDStream( doc, null, true ), "tiff" );
COSDictionary decodeParms = new COSDictionary();
COSDictionary dic = getCOSStream();
extractFromTiff(raf, getCOSStream().createFilteredStream(),decodeParms);
dic.setItem( COSName.FILTER, COSName.CCITTFAX_DECODE);
dic.setItem( COSName.SUBTYPE, COSName.IMAGE);
dic.setItem( COSName.TYPE, COSName.getPDFName( "XObject" ) );
dic.setItem( "DecodeParms", decodeParms);
setBitsPerComponent( 1 );
setColorSpace( new PDDeviceGray() );
setWidth( decodeParms.getInt("Columns") );
setHeight( decodeParms.getInt("Rows") );