You'll need something like this:

        switch (visibility) {
            case HIDDEN:
                field.setFlags(PdfAnnotation.FLAGS_PRINT |
PdfAnnotation.FLAGS_HIDDEN);
                break;
            case VISIBLE_BUT_DOES_NOT_PRINT:
                break;
            case HIDDEN_BUT_PRINTABLE:
                field.setFlags(PdfAnnotation.FLAGS_PRINT |
PdfAnnotation.FLAGS_NOVIEW);
                break;
            default:
                field.setFlags(PdfAnnotation.FLAGS_PRINT);
                break;
        }
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Todd Migliore
> Sent: Tuesday, May 03, 2005 3:07 PM
> To: [email protected]
> Subject: [iText-questions] PDF Annotations
> 
> I am having trouble printing annotations.  I am using the 
> PdfAnnotation Object to add different types of annotations.  
> All the annotations are viewable on the document, however 
> only Pop ups will print.  I am using acrobat 5.0 to print the 
> documents.  I have included some of the code below.  Has 
> anyone experienced anything like this before?  
>  
> Any help would be greatly appreciated.
>  
>  
> PdfAnnotation annot = PdfAnnotation.createPopup(writer, new 
> Rectangle(200f, 250f, 300f, 350f), "13-JUN-2005", true);
>                                 annot.setTitle("AHP Received Date");
>                                 writer.addAnnotation(annot);
>                                 
> writer.addAnnotation(PdfAnnotation.createPopup(writer, new 
> Rectangle(200f, 500f, 300f, 600f), "AHP Received Date: 
> 10-JUN-2005",true));
>                                 
> writer.addAnnotation(PdfAnnotation.createFreeText(writer, new 
> Rectangle(200f, 700f, 300f, 800f), "This is some free text, 
> blah blah blah", cb));
>                        
> writer.addAnnotation(PdfAnnotation.createLine(writer, new 
> Rectangle(200f, 550f, 300f, 650f), "this is a line", 200, 
> 550, 300, 650));
>                        
> writer.addAnnotation(PdfAnnotation.createStamp(writer, new 
> Rectangle(200f, 400f, 300f, 500f), "This is a stamp", "Stamp"));
>                        
> writer.addAnnotation(PdfAnnotation.createText(writer, new 
> Rectangle(200f, 400f, 300f, 500f), "AHP Received Date", 
> "13-JUN-2005", true, "Icon"));
>  
> Todd Migliore
> Assoc. Engineer
> Research Applications Development
> Wyeth Pharmaceuticals
> 484-865-8487
> [EMAIL PROTECTED]
> 


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r 
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to