List<COSName> filters = new ArrayList<COSName>();
filters.add( COSName.FLATE_DECODE );
saveGraphics.setFilters( filters );
}
// insert the new stream at the beginning
compoundStream.insertCOSStream(saveGraphics);
}
// Sets the compoundStream as page contents
sourcePage.setContents( new PDStream(compoundStream) );
output = contentsToAppend.createOutputStream();