0

我用 tcpdf 库在 php 中创建了一个 pdf/a-1b,但没有通过这些错误的验证( http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx ):

pdfaExtension:schemas/ [0] :: 值类型“Schema”中缺少必填字段“valueType”。pdfaExtension:schemas/ [1] :: 值类型“Schema”中缺少必填字段“valueType”。pdfaExtension:schemas/*[2] :: 值类型“Schema”中缺少必填字段“valueType”。

<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>

我该如何解决这个错误?缺少什么价值?在哪里?

谢谢你

4

1 回答 1

0

看起来该valueType元素可能位于错误的位置,或者您需要valueType在描述pdfaSchema.

在您的示例中,您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元素。我不确定这是否符合规范,并且 Acrobat 在转换为 PDF/A 时似乎没有写出这些附加元素。

于 2016-06-14T15:22:08.903 回答