Hi Paulo. Can you please elaborate on why the fix won't happen?
Thanks,
c
On Wed Aug 27/2008 @ 12:08:P +0100 asdasd, Paulo Soares wrote:
> That fix won't happen, change your testing or your iText code.
>
> Paulo
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Chad Loder
> > Sent: Wednesday, August 27, 2008 3:09 AM
> > To: [email protected]
> > Subject: [iText-questions] [patch] output PDF fonts in
> > predictable order
> >
> > One of our issues when unit testing our PDF generation code
> > is that iText
> > creates PDFs with fonts in an unpredictable order. This makes
> > it impossible
> > to simply compare checksums of itext-generated PDF files from
> > one change
> > to the next.
> >
> > This is due to one particular use of HashMap internally
> > within the PdfWriter
> > class. Replacing this use of HashMap with LinkedHashMap
> > solves the problem
> > because LinkedHashMap iterates over its entries in the order they were
> > inserted. LinkedHashMap was added in JDK 1.4 so it will be
> > compatible with
> > the 1.4 requirement that itext has.
> >
> > The following diff fixes the issue and has been tested.
> >
> > Index: itext/java/com/lowagie/text/pdf/PdfWriter.java
> > ===================================================================
> > diff -u -p -r1.1.1.9 PdfWriter.java
> > --- itext/java/com/lowagie/text/pdf/PdfWriter.java 6 Jun
> > 2007 23:11:39 -0000 1.1.1.9
> > +++ itext/java/com/lowagie/text/pdf/PdfWriter.java 26
> > Aug 2008 23:22:06 -0000
> > @@ -57,6 +57,7 @@ import java.util.ArrayList;
> > import java.util.HashMap;
> > import java.util.HashSet;
> > import java.util.Iterator;
> > +import java.util.LinkedHashMap;
> > import java.util.Map;
> > import java.util.TreeMap;
> > import java.util.TreeSet;
> > @@ -1842,7 +1843,7 @@ public class PdfWriter extends DocWriter
> > // [F3] adding fonts
> >
> > /** The fonts of this document */
> > - protected HashMap documentFonts = new HashMap();
> > + protected LinkedHashMap documentFonts = new LinkedHashMap();
> >
> > /** The font number counter for the fonts in the document. */
> > protected int fontNumber = 1;
> >
> >
> > --------------------------------------------------------------
> > -----------
> > This SF.Net email is sponsored by the Moblin Your Move
> > Developer's challenge
> > Build the coolest Linux based applications with Moblin SDK &
> > win great prizes
> > Grand prize is a trip for two to an Open Source event
> > anywhere in the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> > Buy the iText book: http://www.1t3xt.com/docs/book.php
> >
>
>
> Aviso Legal:
> Esta mensagem ? destinada exclusivamente ao destinat?rio. Pode conter
> informa??o confidencial ou legalmente protegida. A incorrecta transmiss?o
> desta mensagem n?o significa a perca de confidencialidade. Se esta mensagem
> for recebida por engano, por favor envie-a de volta para o remetente e
> apague-a do seu sistema de imediato. ? proibido a qualquer pessoa que n?o o
> destinat?rio de usar, revelar ou distribuir qualquer parte desta mensagem.
>
> Disclaimer:
> This message is destined exclusively to the intended receiver. It may contain
> confidential or legally protected information. The incorrect transmission of
> this message does not mean the loss of its confidentiality. If this message
> is received by mistake, please send it back to the sender and delete it from
> your system immediately. It is forbidden to any person who is not the
> intended receiver to use, distribute or copy any part of this message.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php