[gs-devel] 8.64: issue with -dPDFA and an old compiler
Giulio Orsero
giulioo at gmail.com
Wed Apr 22 23:41:06 PDT 2009
Due to a need for PDF/A-1b I compiled 8.64 on Linux RHEL5, RHEL3 and RH6x.
RH6x shipped a long time ago with egcs-2.91.66.
On RHEL3/5 I could create PDF/A fine, while on RH6x I would get corrupted
PDF/A (normal PDFs were OK, only -dPDFA triggered the problem): no apparent
errors on gs side, but Acrobat would display incomplete PDFs.
I noticed that PDF/A created on the rh6x system contained strings like
/Subtype/Type1C
/Metadata -2147483648 0 R/Length 1834>>stream
(ie 32bit overflow) while PDF/A created on RHEL3/5 had
/Subtype/Type1C/Length 1834>>stream
by reading the source I saw that font metadata has been disabled so that
"/Metadata" should never show up.
I solved the issue on the egcs-2.91.66 system with this:
--- base/gdevpdtb.c.orig Wed Apr 22 15:19:25 2009
+++ base/gdevpdtb.c Wed Apr 22 15:19:42 2009
@@ -634,6 +634,7 @@
code = pdf_end_fontfile(pdev, &writer);
if (pdev->PDFA && code >= 0) {
gs_id metadata_object_id;
+ metadata_object_id = 0;
code = pdf_font_metadata(pdev, pbfont, digest, sizeof(digest),
&metadata_object_id);
if (metadata_object_id && code >= 0) {
Maybe you could always initialize it explicitly to cater for old/broken
compilers?
Thanks
--
giulioo at pobox.com
More information about the gs-devel
mailing list