diff options
author | Alex Dupre <ale@FreeBSD.org> | 2012-07-12 08:32:12 +0000 |
---|---|---|
committer | Alex Dupre <ale@FreeBSD.org> | 2012-07-12 08:32:12 +0000 |
commit | 71cdd1cdcc9f89ebb1e8d629bf76b8bdc51bb89d (patch) | |
tree | c39a56619586ee52abfd99ba9c7500b92287b320 /devel/itext | |
parent | d2f0583d13938d82a680d693608a3406c92fa41c (diff) | |
download | ports-71cdd1cdcc9f89ebb1e8d629bf76b8bdc51bb89d.tar.gz ports-71cdd1cdcc9f89ebb1e8d629bf76b8bdc51bb89d.zip |
Notes
Diffstat (limited to 'devel/itext')
-rw-r--r-- | devel/itext/Makefile | 2 | ||||
-rw-r--r-- | devel/itext/files/patch-core_com_lowagie_text_pdf_PdfStamperImp.java | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/devel/itext/Makefile b/devel/itext/Makefile index 4c1336c17edd..5a6e3db81fe1 100644 --- a/devel/itext/Makefile +++ b/devel/itext/Makefile @@ -8,7 +8,7 @@ PORTNAME= itext PORTVERSION= 4.2.0 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= devel java MASTER_SITES= ${MASTER_SITE_LOCAL} diff --git a/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfStamperImp.java b/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfStamperImp.java new file mode 100644 index 000000000000..611d5122a57b --- /dev/null +++ b/devel/itext/files/patch-core_com_lowagie_text_pdf_PdfStamperImp.java @@ -0,0 +1,22 @@ +--- core/com/lowagie/text/pdf/PdfStamperImp.java.orig 2009-11-16 13:48:42.000000000 +0100 ++++ core/com/lowagie/text/pdf/PdfStamperImp.java 2012-07-12 10:27:01.000000000 +0200 +@@ -208,8 +208,17 @@ + } + // metadata + int skipInfo = -1; +- PRIndirectReference iInfo = (PRIndirectReference)reader.getTrailer().get(PdfName.INFO); +- PdfDictionary oldInfo = (PdfDictionary)PdfReader.getPdfObject(iInfo); ++ PRIndirectReference iInfo = null; ++ PdfDictionary oldInfo; ++ PdfObject dictInfo = reader.getTrailer().get(PdfName.INFO); ++ // Info dictionary in the trailer shall be an indirect reference, ++ // but a few broken softwares put it inline ++ if (dictInfo instanceof PdfDictionary) { ++ oldInfo = (PdfDictionary) dictInfo; ++ } else { ++ iInfo = (PRIndirectReference) dictInfo; ++ oldInfo = (PdfDictionary)PdfReader.getPdfObject(iInfo); ++ } + String producer = null; + if (iInfo != null) + skipInfo = iInfo.getNumber(); |