Stop printing PDF form objects
Sometimes you may want to stop PDF Form components printing. JPedal allows considerable flexibility in doing this on any type or subtype of PDF Form Object
This example code will stop printing PDF Forms
try{
//create Map wth int[] array of types and subtypes to ignore (all values in PdfDictionary)
Map map=new HashMap();
//this would stop all subtype popups
map.put(JPedalSettings.IGNORE_FORMS_ON_PRINT,new int[]{PdfDictionary.Popup});
//this would stop all subtype popups and all type PDF Annot
//map.put(JPedalSettings.IGNORE_FORMS_ON_PRINT,new int[]{PdfDictionary.Annot, PdfDictionary.Popup});
//static version for all instances
PdfDecoder.modifyJPedalParameters(map);
//non-static for just this instance
decoder.modifyNonstaticJPedalParameters(map);
}catch(Exception e){
e.printStackTrace();
}
How do I work out the possible values to use
If you run the Java PDF viewer (click here for more help), and open the PDF file, there is an PDF Document Properties option on the File menu. This will display all the FormObjects and their types in the Forms window.

At the top you can see 2 PDF Annotation objects (displayed together as they have the same name - chkumar) with type PdfDictionary.Annot and Subtype PdfDictionary.Popup
Links to related articles
Java PDF viewer example
Complete list of examples with full paths
Additional optional libraries lists items which may be needed for some PDF files or functionality.
Return to main PDF support section
Click here for the main PDF support area with lots of java examples, PDF tutorials and useful information to get the most out of the JPedal PDF library




