[iText] compression

Discussion in 'Java' started by Ingo R. Homann, Feb 28, 2006.

  1. Hi,

    I am generating 2 documents with iText. I want to test, if the documents
    are identical. (Background: I'm doing a refactoring and want to test if
    the functionality remains the same.)

    The documents look identical, but "diff" says that they are not.
    Unfortunately, it doesn't tell me *what* differences are there, because
    the files are binary.

    My first idea was that there is a timestamp in the PDF that is not
    displayed but of course is a difference.

    I tried to filter the PDFs using "hexdump -C", but when comparing the
    results with diff, it is obvious that there are *many* differences (or
    perhaps it is only a small "offset-difference" that diff does not
    realize correctly).

    Anyhow, that kind of comparison does not work.

    So, my question is: (How) can i tell iText to save a document
    "uncompressed", so that the differeneces are more obvious and readable?

    Or is there a completely different approch to my problem rather than
    extract the ASCII out of the PDF at the end?

    Ciao,
    Ingo
    Ingo R. Homann, Feb 28, 2006
    #1
    1. Advertising

  2. Ingo R. Homann

    Rhino Guest

    "Ingo R. Homann" <> wrote in message
    news:4404295a$0$13795$-online.net...
    > Hi,
    >
    > I am generating 2 documents with iText. I want to test, if the documents
    > are identical. (Background: I'm doing a refactoring and want to test if
    > the functionality remains the same.)
    >
    > The documents look identical, but "diff" says that they are not.
    > Unfortunately, it doesn't tell me *what* differences are there, because
    > the files are binary.
    >
    > My first idea was that there is a timestamp in the PDF that is not
    > displayed but of course is a difference.
    >
    > I tried to filter the PDFs using "hexdump -C", but when comparing the
    > results with diff, it is obvious that there are *many* differences (or
    > perhaps it is only a small "offset-difference" that diff does not realize
    > correctly).
    >
    > Anyhow, that kind of comparison does not work.
    >
    > So, my question is: (How) can i tell iText to save a document
    > "uncompressed", so that the differeneces are more obvious and readable?
    >
    > Or is there a completely different approch to my problem rather than
    > extract the ASCII out of the PDF at the end?
    >

    You might get better answers if you tried posting this question on the iText
    forum (at the iText website). You may even find that this has been answered
    already in the archive of that forum. The developers of iText are very
    active in helping users solve problems with iText.

    Here on comp.lang.java.programmer, you will find that most people have never
    used iText and even some of us who have used it, have never tried to do file
    comparisons between different versions of documents.

    --
    Rhino
    Rhino, Feb 28, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marty

    Itext Templates

    Marty, Aug 13, 2003, in forum: Java
    Replies:
    2
    Views:
    9,628
    SkippyFire
    Mar 5, 2010
  2. Chris

    iText HTML->PDF Problems

    Chris, Apr 16, 2004, in forum: Java
    Replies:
    2
    Views:
    7,059
    Chris
    Apr 19, 2004
  3. =?ISO-8859-2?Q?Przemys=B3aw?= Klein

    iText - placing barcode

    =?ISO-8859-2?Q?Przemys=B3aw?= Klein, Mar 10, 2005, in forum: Java
    Replies:
    2
    Views:
    3,932
    Przemek Klein
    Mar 11, 2005
  4. Daniel

    pdf-forms using iText

    Daniel, Jun 9, 2005, in forum: Java
    Replies:
    0
    Views:
    492
    Daniel
    Jun 9, 2005
  5. Tim
    Replies:
    6
    Views:
    11,500
Loading...

Share This Page