pdf/a 验证: pdfa扩展:schemas/*[1] :: 值类型 'Schema' 中缺少必填字段'valueType'



我已经使用TCPDF库中的PHP创建了PDF/A-1B,但不通过验证(http://www.pdf-tools.com/pdf/pdf/pdf/validate-pdfa--在线aspx)对于这些错误:

pdfaextension:schemas/ [0] ::缺少所需字段'valueType'invalue类型'schema'。pdfaextension:schemas/ [1] ::在值类型'模式'中缺少所需字段'valueType'。pdfaextension:schemas/*[2] ::缺少必需字段'valueType'in Value类型'schema'。

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:08:04">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
        <dc:format>application/pdf</dc:format>
        <dc:title>
            <rdf:Alt>
                <rdf:li xml:lang="x-default">PDF Test</rdf:li>
            </rdf:Alt>
        </dc:title>
        <dc:creator>
            <rdf:Seq>
                <rdf:li>Example Creator</rdf:li>
            </rdf:Seq>
        </dc:creator>
        <dc:description>
            <rdf:Alt>
                <rdf:li xml:lang="x-default">Example Description</rdf:li>
            </rdf:Alt>
        </dc:description>
        <dc:subject>
            <rdf:Bag>
                <rdf:li></rdf:li>
            </rdf:Bag>
        </dc:subject>
    </rdf:Description>
    <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/">
        <xmp:CreateDate>2016-06-12T19:59:46+02:00</xmp:CreateDate>
        <xmp:CreatorTool>Example Creator</xmp:CreatorTool>
        <xmp:ModifyDate>2016-06-12T19:59:46+02:00</xmp:ModifyDate>
        <xmp:MetadataDate>2016-06-12T19:59:46+02:00</xmp:MetadataDate>
    </rdf:Description>
    <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
        <pdf:Keywords></pdf:Keywords>
        <pdf:Producer>Example Producer</pdf:Producer>
    </rdf:Description>
    <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
        <xmpMM:DocumentID>uuid:cf05125b-6fc5-54c8-0218-9e2394589e95</xmpMM:DocumentID>
        <xmpMM:InstanceID>uuid:cf05125b-6fc5-54c8-0218-9e2394589e95</xmpMM:InstanceID>
    </rdf:Description>
    <rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/">
        <pdfaid:part>1</pdfaid:part>
        <pdfaid:conformance>B</pdfaid:conformance>
    </rdf:Description>
    <rdf:Description rdf:about="" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
        <pdfaExtension:schemas>
            <rdf:Bag>
                <rdf:li rdf:parseType="Resource">
                    <pdfaSchema:namespaceURI>http://ns.adobe.com/pdf/1.3/</pdfaSchema:namespaceURI>
                    <pdfaSchema:prefix>pdf</pdfaSchema:prefix>
                    <pdfaSchema:schema>Adobe PDF Schema</pdfaSchema:schema>
                    <pdfaSchema:property>
                        <rdf:Seq>
                            <rdf:li rdf:parseType="Resource">
                                <pdfaProperty:category>internal</pdfaProperty:category>
                                <pdfaProperty:description>A name object indicating whether the document has been modified to include trapping information</pdfaProperty:description>
                                <pdfaProperty:name>Trapped</pdfaProperty:name>
                                <pdfaProperty:valueType>Text</pdfaProperty:valueType>
                            </rdf:li>
                        </rdf:Seq>
                    </pdfaSchema:property>
                </rdf:li>
                <rdf:li rdf:parseType="Resource">
                    <pdfaSchema:namespaceURI>http://ns.adobe.com/xap/1.0/mm/</pdfaSchema:namespaceURI>
                    <pdfaSchema:prefix>xmpMM</pdfaSchema:prefix>
                    <pdfaSchema:schema>XMP Media Management Schema</pdfaSchema:schema>
                    <pdfaSchema:property>
                        <rdf:Seq>
                            <rdf:li rdf:parseType="Resource">
                                <pdfaProperty:category>internal</pdfaProperty:category>
                                <pdfaProperty:description>UUID based identifier for specific incarnation of a document</pdfaProperty:description>
                                <pdfaProperty:name>InstanceID</pdfaProperty:name>
                                <pdfaProperty:valueType>URI</pdfaProperty:valueType>
                            </rdf:li>

                            <rdf:li rdf:parseType="Resource">
                       <pdfaProperty:category>internal</pdfaProperty:category>
                       <pdfaProperty:description>The common identifier for all versions and renditions of a document.</pdfaProperty:description>
                       <pdfaProperty:name>OriginalDocumentID</pdfaProperty:name>
                       <pdfaProperty:valueType>URI</pdfaProperty:valueType>
                    </rdf:li>

                        </rdf:Seq>
                    </pdfaSchema:property>
                </rdf:li>
                <rdf:li rdf:parseType="Resource">
                    <pdfaSchema:namespaceURI>http://www.aiim.org/pdfa/ns/id/</pdfaSchema:namespaceURI>
                    <pdfaSchema:prefix>pdfaid</pdfaSchema:prefix>
                    <pdfaSchema:schema>PDF/A ID Schema</pdfaSchema:schema>
                    <pdfaSchema:property>
                        <rdf:Seq>
                            <rdf:li rdf:parseType="Resource">
                                <pdfaProperty:category>internal</pdfaProperty:category>
                                <pdfaProperty:description>Part of PDF/A standard</pdfaProperty:description>
                                <pdfaProperty:name>part</pdfaProperty:name>
                                <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
                            </rdf:li>
                            <rdf:li rdf:parseType="Resource">
                                <pdfaProperty:category>internal</pdfaProperty:category>
                                <pdfaProperty:description>Amendment of PDF/A standard</pdfaProperty:description>
                                <pdfaProperty:name>amd</pdfaProperty:name>
                                <pdfaProperty:valueType>Text</pdfaProperty:valueType>
                            </rdf:li>
                            <rdf:li rdf:parseType="Resource">
                                <pdfaProperty:category>internal</pdfaProperty:category>
                                <pdfaProperty:description>Conformance level of PDF/A standard</pdfaProperty:description>
                                <pdfaProperty:name>conformance</pdfaProperty:name>
                                <pdfaProperty:valueType>Text</pdfaProperty:valueType>
                            </rdf:li>
                        </rdf:Seq>
                    </pdfaSchema:property>
                </rdf:li>
            </rdf:Bag>
        </pdfaExtension:schemas>
    </rdf:Description>
</rdf:RDF>

如何解决此错误?缺少什么值?在哪里?

谢谢

看起来valueType元素可能位于错误的位置,或者您需要在描述pdfaSchema的元素的根部其他valueType元素。

在您的示例中,您的pdfaSchema定义为

<rdf:li rdf:parseType="Resource">
    <pdfaSchema:namespaceURI>http://ns.adobe.com/pdf/1.3/</pdfaSchema:namespaceURI>
    <pdfaSchema:prefix>pdf</pdfaSchema:prefix>
    <pdfaSchema:schema>Adobe PDF Schema</pdfaSchema:schema>
    <pdfaSchema:property>
        <rdf:Seq>
            <rdf:li rdf:parseType="Resource">
                <pdfaProperty:category>internal</pdfaProperty:category>
                <pdfaProperty:description>A name object indicating whether the document has been modified to include trapping information</pdfaProperty:description>
                <pdfaProperty:name>Trapped</pdfaProperty:name>
                <pdfaProperty:valueType>Text</pdfaProperty:valueType>
            </rdf:li>
        </rdf:Seq>
    </pdfaSchema:property>
</rdf:li>

在此rdf:li元素(以及其他两个)内部,看起来您需要附加的pdfaSchema:valueType元素。我不确定这对规范是否正确,而转换为PDF/A。

时,Acrobat似乎不会写出这些其他元素。

最新更新