Package org.apache.pdfbox.pdmodel.interactive.annotation

Examples of org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget


     * @return The widget that is associated with this field.
     * @throws IOException If there is an error getting the widget object.
     */
    public PDAnnotationWidget getWidget() throws IOException
    {
        PDAnnotationWidget retval = null;
        List kids = getKids();
        if( kids == null )
        {
            retval = new PDAnnotationWidget( getDictionary() );
        }
        else if( kids.size() > 0 )
        {
            Object firstKid = kids.get( 0 );
            if( firstKid instanceof PDAnnotationWidget )
View Full Code Here


                {
                    kidsList.add( PDFieldFactory.createField( acroForm, kidDictionary ));
                }
                else if( "Widget".equals( kidDictionary.getNameAsString( "Subtype" ) ) )
                {
                    kidsList.add( new PDAnnotationWidget( kidDictionary ) );
                }
                else
                {
                    //
                    kidsList.add( PDFieldFactory.createField( acroForm, kidDictionary ));
View Full Code Here

        }

        /*
         * The widget validation will be done by the widget annotation, a widget contained in a Field can't have action.
         */
        PDAnnotationWidget widget = aField.getWidget();
        if (res && widget != null)
        {
            ContextHelper.validateElement(ctx, widget.getDictionary(), ANNOTATIONS_PROCESS);
            COSBase act = widget.getDictionary().getDictionaryObject(COSName.A);
            if (act != null)
            {
                addValidationError(ctx, new ValidationError(ERROR_ACTION_FORBIDDEN_WIDGET_ACTION_FIELD,
                        "\"A\" must not be used in a Field dictionary"));
                res = false;
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget

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.