Hello.
I have developed an application related to a PDF/A-1b.
I could solve file ID entry problem for your help.
But, the XMP Metadata of my PDF file did not comply with PDF/A-1.
Therefore, I tried to modify iTextSharp to comply the XMP spec of PDF/A-1.
I worked as this;
*1. PDF/A-1 requires PDF/A-1 entry metadata at XMP metadata of PDF/A-1 file.
*
*I made a function at the XmpWriter class.*
---------------------------------------------
public void AddPDFAEntry()
{
writer.Write("<rdf:Description rdf:about=''");
writer.Write(" xmlns:pdfaid='http://www.aiim.org/pdfa/ns/id/'
");
writer.Write("<pdfaid:part>1</pdfaid:part>");
writer.Write("<pdfaid:conformance>B</pdfaid:conformance>");
writer.Write("</rdf:Description>\n");
}
---------------------------------------------
And, I call it before call the Close function of XmpWriter instance.
**
*It is only temporary function.*
I think that PDFA Schema class must be made to insert PDF/A-1 entry
organically, but I made it only to check possibility.
*2. I fixed a problem about Creation Date at PDFDate.cs to prevent **"'" to
become **"'**" in the XMP metadata string.*
-------------------------------------
public static String GetW3CDate(String d) {
DateTime c = Decode(d);
String s = c.ToString
("yyyy-MM-dd\\'T\\'HH\\:mm\\:ss\\.fff\\'");
*//remove "'" to prevent s to become "**'"*
* s= s.Replace("'","");*
s += c.ToString("zzz", DateTimeFormatInfo.InvariantInfo);
s += "'";
return s;
}
*3. I change a line to set the subject value of info HashTable into
dc:**Description resource.
*
PDF/A-1 says as this;
----------------------------------
If the *Subject *entry (of PDF data type text string) is present in the
document information dictionary, the document's Metadata must contain an
equivalent enÂtry *dc:description ["x-default"] *of XMP data type Lang Alt
where *dc *refers to the Dublin Core schema (the prefix is actually
arbitrary).
Therefore, I change a line as this at the constructor of XmpWriter class;
if ("Subject".Equals(key)) {
*dc.AddDescription(value); //not Subject but Description at PDF/A-1*
}
After applied 1 to 3, I could make my PDF files comply PDF/A-1b with Acrobat
8 Pro's Preflight and another PDF/A-1 Validating tool.
By the way, I do not want to use the iTextSharp DLL that I modified because
I don't desire to violate LGPL license.
If possible, could you insert PDF/A-1 compliant functions into next
release more
elegantly than mine to satisfy with the XMP specification of PDF/A-1?
If you could take a few minutes to apply my requests, I would really
appreciate it.
Thank you in advance for your help.
Best regards,
S. H. Park
P.S. My work was base on iTextSharp 3.1.8.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/