Package org.apache.jempbox.xmp.pdfa

Examples of org.apache.jempbox.xmp.pdfa.XMPSchemaPDFAId


            PDMetadata metadata = new PDMetadata(doc);
            cat.setMetadata(metadata);

            // jempbox version
            XMPMetadata xmp = new XMPMetadata();
            XMPSchemaPDFAId pdfaid = new XMPSchemaPDFAId(xmp);
            xmp.addSchema(pdfaid);
            pdfaid.setConformance("B");
            pdfaid.setPart(1);
            pdfaid.setAbout("");
            metadata.importXMPMetadata(xmp);
   
            InputStream colorProfile = CreatePDFA.class.getResourceAsStream("/org/apache/pdfbox/resources/pdfa/sRGB Color Space Profile.icm");
            // create output intent
            PDOutputIntent oi = new PDOutputIntent(doc, colorProfile);
View Full Code Here


            Float.toString(document.getDocument().getVersion()));

        try {          
            if( xmp != null ) {
                xmp.addXMLNSMapping(XMPSchemaPDFAId.NAMESPACE, XMPSchemaPDFAId.class);
                XMPSchemaPDFAId pdfaxmp = (XMPSchemaPDFAId) xmp.getSchemaByClass(XMPSchemaPDFAId.class);
                if( pdfaxmp != null ) {
                    metadata.set("pdfaid:part", Integer.toString(pdfaxmp.getPart()));
                    if (pdfaxmp.getConformance() != null) {
                        metadata.set("pdfaid:conformance", pdfaxmp.getConformance());
                        String version = "A-"+pdfaxmp.getPart()+pdfaxmp.getConformance().toLowerCase(Locale.ROOT);
                        metadata.set("pdfa:PDFVersion", version );
                        metadata.add(TikaCoreProperties.FORMAT.getName(),
                            MEDIA_TYPE.toString()+"; version=\""+version+"\"" );
                    }
                }
View Full Code Here

            Float.toString(document.getDocument().getVersion()));

        try {          
            if( xmp != null ) {
                xmp.addXMLNSMapping(XMPSchemaPDFAId.NAMESPACE, XMPSchemaPDFAId.class);
                XMPSchemaPDFAId pdfaxmp = (XMPSchemaPDFAId) xmp.getSchemaByClass(XMPSchemaPDFAId.class);
                if( pdfaxmp != null ) {
                    metadata.set("pdfaid:part", Integer.toString(pdfaxmp.getPart()));
                    if (pdfaxmp.getConformance() != null) {
                        metadata.set("pdfaid:conformance", pdfaxmp.getConformance());
                        String version = "A-"+pdfaxmp.getPart()+pdfaxmp.getConformance().toLowerCase(Locale.ROOT);
                        metadata.set("pdfa:PDFVersion", version );
                        metadata.add(TikaCoreProperties.FORMAT.getName(),
                            MEDIA_TYPE.toString()+"; version=\""+version+"\"" );
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.jempbox.xmp.pdfa.XMPSchemaPDFAId

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.