Examples of PDAppearanceString


Examples of org.apache.pdfbox.pdmodel.interactive.form.PDAppearanceString

    {
        // TODO: handle appearance generation for other field types
        if (field instanceof PDVariableText)
        {

            PDAppearanceString pdAppearance = new PDAppearanceString(field.getAcroForm(),
                    (PDVariableText) field);

            Object fieldValue = field.getValue();

            // in case there is no value being set generate the visual
            // appearance with an empty String
            if (fieldValue == null)
            {
                fieldValue = "";
            }

            // TODO: implement the handling for additional values.
            if (fieldValue instanceof COSString)
            {
                try
                {
                    pdAppearance.setAppearanceValue(((COSString) fieldValue).getString());
                }
                catch (IOException e)
                {
                    LOG.debug("Unable to generate the field appearance.", e);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.