The reason is that all the strings in the info directory are written in
UTF-16, which is OK for all the keys but for ModDate and CreationDate,
which need to be in ASCII.

Until the sixth edition of the PDF reference book, it was unclear if this
was accepted. (The text says that CreationDate and ModDate are of the date
type, which in turn is a string which is different from a text string)
(sections 3.8.0-2 and 8.2 of the second edition). The sixth edition mades
clear however that dates are ASCII strings (table 10.2 and section 3.8.0-3).

I suggest something like this patch to be applied. (note that I'm not
familiar at all with C++ so I kind of guessed what had to be changed)

Regards,
Quentin Godfroy

---
Signed-off by: Quentin Godfroy <[EMAIL PROTECTED]>

diff -ruNp pdftk-1.41/pdftk/report.cc pdftk-1.41-patch/pdftk/report.cc
--- pdftk-1.41/pdftk/report.cc  2006-09-06 01:49:32.000000000 +0200
+++ pdftk-1.41-patch/pdftk/report.cc    2008-01-21 02:19:44.000000000 +0100
@@ -1228,7 +1228,7 @@ UpdateInfo( itext::PdfReader* reader_p,
                                                                
string_to_jcharstring( jvs, jvs_size, &jvs_len, it->second );
 
                                                                info_p->put( 
new itext::PdfName( JvNewStringLatin1(it->first.c_str()) ),
-                                                                               
                                 new itext::PdfString( JvNewString(jvs, 
jvs_len), itext::PdfObject::TEXT_UNICODE ) );
+                                                                               
                                 new itext::PdfString( JvNewString(jvs, 
jvs_len), (strcmp(it->first.c_str(), "ModDate") && strcmp(it->first.c_str(), 
"CreationDate")) ? itext::PdfObject::TEXT_UNICODE : 
itext::PdfObject::TEXT_PDFDOCENCODING) );
                                                        }
                                                }
                                }



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to