Package org.apache.pdfbox.pdmodel.interactive.form

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


        {
            COSDictionary acroFormDic =
                (COSDictionary)root.getDictionaryObject( COSName.ACRO_FORM );
            if( acroFormDic != null )
            {
                acroForm = new PDAcroForm( document, acroFormDic );
            }
        }
        return acroForm;
    }
View Full Code Here


        if( destCatalog.getOpenAction() == null )
        {
            destCatalog.setOpenAction( srcCatalog.getOpenAction() );
        }

        PDAcroForm destAcroForm = destCatalog.getAcroForm();
        PDAcroForm srcAcroForm = srcCatalog.getAcroForm();
        if( destAcroForm == null )
        {
            cloneForNewDocument( destination, srcAcroForm );
            destCatalog.setAcroForm( srcAcroForm );
        }
View Full Code Here

        return "?";
    }

    private List<String> acroForms() {
        PDDocumentCatalog catalog = document.getDocumentCatalog();
        PDAcroForm af = catalog.getAcroForm();
        List<String> result = new ArrayList<String>();

        if (af != null) {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = null;
            Document doc = null;
            String xml = null;
            boolean parsingerror = false;
            try {
                db = dbf.newDocumentBuilder();
                InputSource is = new InputSource();
                PDXFA xfa = af.getXFA();
                if (xfa == null)
                    return result;
                xml = xmlFromXFA(xfa);
                is.setCharacterStream(new StringReader(xml));
                doc = db.parse(is);
View Full Code Here

        this.scrutinizer = scrutinizer;
    }

    public void run(PDDocument document) {
        PDDocumentCatalog catalog = document.getDocumentCatalog();
        PDAcroForm af = catalog.getAcroForm();

        if (af != null) {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = null;
            Document doc = null;
            String xml = null;
            boolean parsingerror = false;
            try {
                db = dbf.newDocumentBuilder();
                InputSource is = new InputSource();
                PDXFA xfa = af.getXFA();
                if (xfa == null)
                    return;
                xml = DocumentAdapter.xmlFromXFA(xfa);
                is.setCharacterStream(new StringReader(xml));
                doc = db.parse(is);
View Full Code Here

        PDDocumentCatalog catalog = pdf.getDocumentCatalog();

        if (catalog == null)
            return;

        PDAcroForm form = catalog.getAcroForm();
        if (form == null)
            return;

        @SuppressWarnings("rawtypes")
        List fields = form.getFields();

        if (fields == null)
            return;

        @SuppressWarnings("rawtypes")
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm

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.