Examples of PropertyOptions


Examples of com.itextpdf.xmp.options.PropertyOptions

     *
     * @param xmpMeta
     * @param subject
     */
    static public void addSubject(XMPMeta xmpMeta, String subject) throws XMPException {
        xmpMeta.appendArrayItem(XMPConst.NS_DC, SUBJECT, new PropertyOptions(PropertyOptions.ARRAY), subject, null);
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

     * @param subject array of subjects
     */
    static public void setSubject(XMPMeta xmpMeta, String[] subject) throws XMPException {
        XMPUtils.removeProperties(xmpMeta, XMPConst.NS_DC, SUBJECT, true, true);
        for (int i = 0; i < subject.length; i++) {
            xmpMeta.appendArrayItem(XMPConst.NS_DC, SUBJECT, new PropertyOptions(PropertyOptions.ARRAY), subject[i], null);
        }
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

     *
     * @param xmpMeta
     * @param author
     */
    static public void addAuthor(XMPMeta xmpMeta, String author) throws XMPException {
        xmpMeta.appendArrayItem(XMPConst.NS_DC, CREATOR, new PropertyOptions(PropertyOptions.ARRAY_ORDERED), author, null);
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

     * @param author
     */
    static public void setAuthor(XMPMeta xmpMeta, String[] author) throws XMPException {
        XMPUtils.removeProperties(xmpMeta, XMPConst.NS_DC, CREATOR, true, true);
        for (int i = 0; i < author.length; i++) {
            xmpMeta.appendArrayItem(XMPConst.NS_DC, CREATOR, new PropertyOptions(PropertyOptions.ARRAY_ORDERED), author[i], null);
        }
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

     *
     * @param xmpMeta
     * @param publisher
     */
    static public void addPublisher(XMPMeta xmpMeta, String publisher) throws XMPException {
        xmpMeta.appendArrayItem(XMPConst.NS_DC, PUBLISHER, new PropertyOptions(PropertyOptions.ARRAY_ORDERED), publisher, null);
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

     * @param publisher
     */
    static public void setPublisher(XMPMeta xmpMeta, String[] publisher) throws XMPException {
        XMPUtils.removeProperties(xmpMeta, XMPConst.NS_DC, PUBLISHER, true, true);
        for (int i = 0; i < publisher.length; i++) {
            xmpMeta.appendArrayItem(XMPConst.NS_DC, PUBLISHER, new PropertyOptions(PropertyOptions.ARRAY_ORDERED), publisher[i], null);
        }
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

     *                  the empty string.
     * @param value     the value of the array item.
     * @throws XMPException Wraps all errors and exceptions that may occur.
     */
    public void appendArrayItem(String schemaNS, String arrayName, String value) throws XMPException {
        xmpMeta.appendArrayItem(schemaNS, arrayName, new PropertyOptions(PropertyOptions.ARRAY), value, null);
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

     *                  the empty string.
     * @param value     the value of the array item.
     * @throws XMPException Wraps all errors and exceptions that may occur.
     */
    public void appendOrderedArrayItem(String schemaNS, String arrayName, String value) throws XMPException {
        xmpMeta.appendArrayItem(schemaNS, arrayName, new PropertyOptions(PropertyOptions.ARRAY_ORDERED), value, null);
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

     *                  the empty string.
     * @param value     the value of the array item.
     * @throws XMPException Wraps all errors and exceptions that may occur.
     */
    public void appendAlternateArrayItem(String schemaNS, String arrayName, String value) throws XMPException {
        xmpMeta.appendArrayItem(schemaNS, arrayName, new PropertyOptions(PropertyOptions.ARRAY_ALTERNATE), value, null);
    }
View Full Code Here

Examples of com.itextpdf.xmp.options.PropertyOptions

        if (key instanceof String)
            key = new PdfName((String) key);
        if (PdfName.TITLE.equals(key)) {
            xmpMeta.setLocalizedText(XMPConst.NS_DC, DublinCoreProperties.TITLE, XMPConst.X_DEFAULT, XMPConst.X_DEFAULT, value);
        } else if (PdfName.AUTHOR.equals(key)) {
            xmpMeta.appendArrayItem(XMPConst.NS_DC, DublinCoreProperties.CREATOR, new PropertyOptions(PropertyOptions.ARRAY_ORDERED), value, null);
        } else if (PdfName.SUBJECT.equals(key)) {
            xmpMeta.setLocalizedText(XMPConst.NS_DC, DublinCoreProperties.DESCRIPTION, XMPConst.X_DEFAULT, XMPConst.X_DEFAULT, value);
        } else if (PdfName.KEYWORDS.equals(key)) {
            for (String v : value.split(",|;"))
                if (v.trim().length() > 0)
                    xmpMeta.appendArrayItem(XMPConst.NS_DC, DublinCoreProperties.SUBJECT, new PropertyOptions(PropertyOptions.ARRAY), v.trim(), null);
            xmpMeta.setProperty(XMPConst.NS_PDF, PdfProperties.KEYWORDS, value);
        } else if (PdfName.PRODUCER.equals(key)) {
            xmpMeta.setProperty(XMPConst.NS_PDF, PdfProperties.PRODUCER, value);
        } else if (PdfName.CREATOR.equals(key)) {
            xmpMeta.setProperty(XMPConst.NS_XMP, XmpBasicProperties.CREATORTOOL, value);
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.