Well, I'm not sure if any of this helps you beyond what
you could get from pdflister ( which I just found out
about today ) or the rups/pdftk packages
but if you are willing to help me develop my 
utilities great :) 
Certainly
a text location dump tells you they are different ( duh)
but have some locations that seem to line up
( these are the text fields that are in same position
in both docs, the fields are number_of_docs, page, x,y, text)

$ cat text_mac text_doze |sort | uniq -c | sort -g -r | more

2 1 57918 -57100  Comments
2 1 57918 -53700  Provider One - Priority 3
[... ed for size ]
2 1 57918 -24300  Priority 1
2 1 57918 -19300  Provider One - Priority 3
2 1 3255 -57100  Task
2 1 3255 -55300  Greg Zimlich
2 1 3255 -53700  834
2 1 3255 -52100  Def08724
2 1 3255 -50500  Def11491
2 1 3255 -48900  ESI Extracts
2 1 3255 -47300  Adaptis Connect
[etc]
These seem to be near each other but not quite in 
same place, 

  1 1 3255 -9700  BH Payments Roster File 12009
  1 1 3255 -8900  BH Final Roster (Eligibility file) 12008
  1 1 3255 -8100  Provider Network Form A IPND/OIC
  1 1 3255 -7300  BH Payments Roster File 12009
  1 1 3255 -6500  Provider Advantage Extract
  1 1 3255 -5700  Provider Network Form A IPND/OIC
  1 1 3255 -4100  Provider Advantage Extract

The reflection traversal utility did seem to show a difference
in the organization but I can't tell if it is of any significance
and there is some binary data I left garbled. If you just
dump dictionaries in the order in which they are found,
the resulting text is different( if you think this MAY
be useful I can try to clean and format the output, I just
wanted to make sure I could use the itext library with this) ,

$ diff doze mac | unix2dos |head> /dev/clipboard

[ hotmail seems to think that less than means html so I had
to edit that out of these diff dumps... ]

3,5c3,5
  /Page   null bytes 
  array of size 5 
  /PDF  /Text  /ImageB  /ImageC  /ImageI  /Helvetica  /Font   /Type1   
/WinAnsiEncoding   /Helvetica-Bold  reference loop cut
---
>  null bytes 
>   /Page  array of size 5 
>  /PDF  /Text  /ImageB  /ImageC  /ImageI  /Helvetica  /Font   /WinAnsiEncoding 
>   /Type1   /Helvetica-Bold  reference loop cut



All the sizes I caught are the same ( although dates do seem to differ LOL),
( this output contains lines from the dumps of your two files
and counts the number of occurences of each line.)


$ cat doze mac | sort | uniq -c | sort -g -r | unix2dos>/dev/clipboard

      2 arraylist 0 
      2 array of size 2 
      2  0.0  0.0  595.0  842.0   90.0    HashMap 6 
      2  /Catalog  /Pages  1.0  array of size 1 
      2   key 4  Producer  iText 2.1.5 (by lowagie.com)   key 5  Title  
TaskBlocks Report page 1 Rectangle: 595.0x842.0 (rot: 0 degrees) Rectangle: 
842.0x595.0 (rot: 90 degrees)
      2     array of size 4 
      1  [ garbled bin data]   TaskBlocks  iText 2.1.5 (by lowagie.com)   
TaskBlocks Report   D:20090325141132-07'00'   Listing of Assigned Tasks from 
TaskBlocks   D:20090325141132-07'00'    8.0  HashMap 0 
      1  null bytes 
      1  array of size 5 
      1  [ garbled bin data]    8.0   iText 2.1.5 (by lowagie.com)  TaskBlocks  
 TaskBlocks Report   D:20090326062203-07'00'   Listing of Assigned Tasks from 
TaskBlocks   D:20090326062203-07'00'   HashMap 0 
      1  /Page   null bytes 
      1  /PDF  /Text  /ImageB  /ImageC  /ImageI  /Helvetica  /Font   
/WinAnsiEncoding   /Type1   /Helvetica-Bold  reference loop cut
      1  /PDF  /Text  /ImageB  /ImageC  /ImageI  /Helvetica  /Font   /Type1   
/WinAnsiEncoding   /Helvetica-Bold  reference loop cut
      1   key 0  ModDate  D:20090326062203-07'00'   key 1  Subject  Listing of 
Assigned Tasks from TaskBlocks   key 2  Creator  TaskBlocks   key 3  
CreationDate  reference loop cut
      1   key 0  ModDate  D:20090325141132-07'00'   key 1  Subject  Listing of 
Assigned Tasks from TaskBlocks   key 2  Creator  TaskBlocks   key 3  
CreationDate  reference loop cut
      1   /Page  array of size 5 


Could also attach an additional copy or two of your 
confidentiality notice ( lol, sorry I just need to
point out something to make my rants look more acceptable).





----------------------------------------
> Date: Thu, 26 Mar 2009 06:33:48 -0700
> From: [email protected]
> To: [email protected]
> Subject: Re: [iText-questions] PdfPCell contents wrap on Mac but not on 
> Windows
>
>>I would ask the more general question, "does anyone have a good
>>diff or comparison utility for PDF files?"
>
>>I have my reflection invoked dumper, if I get time I'd be curious to
> see if
>>I could find the differences if you could post the two files. Not sure
>
>>about the OS differences but certainly anyone working with PDF files
> must
>>have some utilities of this type, RUP perhaps or simply pdftk would
> help
>>isolate the problem?
>
>
> I have attached copies of the PDF files that were generated from the
> same code.
>
> Code is: (BTW, I am using iText-2.1.5 and Java 5)
>
> float[] widths = {0.40f, 0.10f, 0.10f, 0.10f, 0.30f};
> PdfPTable table = new PdfPTable(widths);
> table.setWidthPercentage(95f);
>
> PdfPCell cell = null;
>
> table.addCell(createHeaderPCell("Task"));
> table.addCell(createHeaderPCell("Start", true));
> table.addCell(createHeaderPCell("Stop", true));
> table.addCell(createHeaderPCell("Duration", true));
> table.addCell(createHeaderPCell("Comments"));
>
> ArrayList mans = taskModel.getWorkerList();
> for(ManImpl man: mans) {
> cell = new PdfPCell(new Paragraph(man.getName(), new
> Font(Font.HELVETICA, 14, Font.BOLD)));
> cell.setColspan(5);
> table.addCell(cell);
>
> ArrayList tasks = taskModel.getTasksForMan(man);
>
> for(TaskImpl task: tasks) {
> cell = createTextPCell(task.getName());
> table.addCell(cell);
> table.addCell( createTextPCell( Utils.formatShortDate(
> task.getStartDate()), true));
> table.addCell( createTextPCell( Utils.formatShortDate(
> task.getFinishDate()), true));
> table.addCell( createTextPCell( String.valueOf(
> task.getDuration()), true));
> cell = createTextPCell(task.getComment());
> table.addCell(cell);
> }
> }
>
> document.add(table);
>
> ===================
>
> private PdfPCell createTextPCell(String text, boolean center) {
> PdfPCell cell = createTextPCell(text);
> cell.setHorizontalAlignment(Element.ALIGN_LEFT);
> cell.setVerticalAlignment(Element.ALIGN_BASELINE);
> cell.setNoWrap(false);
> cell.setPadding(.1f);
> if (center) {
> centerPCell(cell);
> }
> return cell;
> }
>
> private PdfPCell createTextPCell(String text) {
> if (text != null) {
> return new PdfPCell(new Paragraph(text, new
> Font(Font.HELVETICA)));
> } else {
> return new PdfPCell(new Paragraph(""));
> }
> }
>
> private PdfPCell createHeaderPCell(String text, boolean center)
> {
> PdfPCell cell = createTextPCell(text);
> cell.setGrayFill(.75f);
> if (center) {
> centerPCell(cell);
> }
> return cell;
>
> }
>


_________________________________________________________________
Express your personality in color! Preview and select themes for HotmailĀ®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme
------------------------------------------------------------------------------
_______________________________________________
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

Reply via email to