Package org.pdfbox.pdmodel.annotation.interactive

Examples of org.pdfbox.pdmodel.annotation.interactive.PDField


        List fields = acroForm.getFields();
        Iterator fieldsIter = fields.iterator();

        while( fieldsIter.hasNext() )
        {
            PDField field = (PDField)fieldsIter.next();

            String outputString =
                field.getName() + "=" + field.toString() +
                " rect=" + field.getRectangle();

            System.out.println( outputString );
        }
    }
View Full Code Here


            for( int i=0; i<fields.size(); i++ )
            {
                COSDictionary fdfField = (COSDictionary)fields.getObject( i );
                COSString fieldName = (COSString)fdfField.getDictionaryObject( COSName.getPDFName( "T" ) );
                System.out.println( "Processing " + fieldName );
                PDField docField = acroForm.getField( fieldName.getString() );
                if( docField != null )
                {
                    docField.importFDF( fdfField );
                }
            }
        }
    }
View Full Code Here

     */
    public void setField( PDDocument pdfDocument, String name, String value ) throws IOException
    {
        PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog();
        PDAcroForm acroForm = docCatalog.getAcroForm();
        PDField field = acroForm.getField( name );
        if( field != null )
        {
            field.setValue( value );
        }
        else
        {
            System.err.println( "No field found with name:" + name );
        }
View Full Code Here

TOP

Related Classes of org.pdfbox.pdmodel.annotation.interactive.PDField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.