Bug 692748

Summary: When creating PDF/A the XMP meta data generated is incorrect---continued
Product: Ghostscript Reporter: William Fausser <William_Fausser>
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED INVALID    
Severity: major    
Priority: P4    
Version: 9.04   
Hardware: All   
OS: All   
Customer: Word Size: ---
Attachments: generated from modified gdevpdfe.c

Description William Fausser 2011-12-16 19:28:42 UTC
Created attachment 8228 [details]
generated from modified gdevpdfe.c

The XMP meta component no longer verifies as compliant PDF/A under
Adobe Acrobat preflight 10.x.

In gdevpdfe.c  in the following segment of code, rfd:Seq was changed to rfd:Alt:

 /* According to the PDF/A specification
                           "it shall be represented by an ordered Text array of
                           length one whose single entry shall consist
                           of one or more names". */
                        pdf_xml_tag_open(s, "rdf:Alt");
                        {
                            pdf_xml_tag_open(s, "rdf:li");
                            {
                                code = pdf_xmp_write_docinfo_item(pdev, s,  "/Author", "Unknown",
                                            pdf_xml_data_write);
                                if (code < 0)
                                    return code;
                            }
                            pdf_xml_tag_close(s, "rdf:li");
                        }
                        pdf_xml_tag_close(s, "rdf:Alt");
                    }
                    pdf_xml_tag_close(s, "dc:creator");
                }
                if (cos_dict_find(pdev->Info, (const byte *)"/Subject", 8)) {
                    pdf_xml_tag_open(s, "dc:description");
                    {
                        pdf_xml_tag_open(s, "rdf:Alt");
                        {
                            pdf_xml_tag_open(s, "rdf:li");
                            {
                                code = pdf_xmp_write_docinfo_item(pdev, s,  "/Subject", "No Subject",
                                            pdf_xml_data_write);
                                if (code < 0)
                                    return code;
                            }
                            pdf_xml_tag_close(s, "rdf:li");
                        }
                        pdf_xml_tag_close(s, "rdf:Alt");


After saving, make and recreating the attached ngrsgao_PDFA.pdf... it now 
verifies as a compliant PDF/A under Adobe Acrobat 10.x
Comment 1 Ken Sharp 2011-12-17 10:34:28 UTC
I appreciate the patch, but please don't open new bug reports for the same issue. 

Can you point me to the section of the XMP spec which covers this ? I'd prefer to read up on the subject than blindly accept a patch, Acrobat has been known to be incorrect before.
Comment 2 Ken Sharp 2011-12-17 10:34:53 UTC
*** Bug 692742 has been marked as a duplicate of this bug. ***
Comment 3 William Fausser 2011-12-20 14:03:47 UTC
Sorry, Strike the hack of 2011-12-16 19:28:42


The initial problem was generated from an invalid pdfmark file containing:

[ /Title (Document title)
  /Author (Author name)
  /Subject (Report Name )
  /Keywords (comma, separated, keywords)
  /Creator (Ghostscript-9.01)
  /Producer (PDF producer name or note)
  /DOCINFO pdfmark


I took the file out of the command and was able to generate a valid PDF/A.