Link to home
Create AccountLog in
Avatar of jwright9
jwright9

asked on

Extracting hidden text from a PDF using iText

I used iText to create a line of hidden string in a PDF as follows:

TextField field = new TextField(writer, new Rectangle(0,0,50,20), "field1");
            //set to 1 for hidden text and 0 for visible
            field.setVisibility(0);
            field.setText("Bugle");
            writer.addAnnotation(field.getTextField());

I need to extract this hidden text from the PDF at a latter time using PDFBOX.  It's an open source PDF utility library.  If anybody has any experience with this sort of thing, I would love to hear your solution.
ASKER CERTIFIED SOLUTION
Avatar of contactkarthi
contactkarthi
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of jwright9
jwright9

ASKER

contactkarthi, Let me try this approach.  Its a good one I feell.  I just want to try it out before I get back to you.

Thanks!