Sadly, Consistent display isn't a reasonable expectation.
 
The PDF can be precise.  That's what PDF is FOR.
 
HTML, on the other hand, varies widely.  Different browsers display the same page in different ways.  Professional web designers spend long hours ironing out all the stupid little differences between Firefox and IE and Safari and...  Why do you think 'Flash' sites are becoming popular?
 
Don't expect them to look identical.  I wouldn't even expect them to be all that similar from a tool like iText, using their high-level objects. 
 
If you want precision, stick to PDF. 
 
This is called "Managing Expectations".  Don't expect HTML & PDF & RTF to look the same.  You'll be disappointed.  A disappointed customer is an unhappy customer... but when you're consuming something freely given, you have to allow for different sets of priorities.
 
Or you can 'fix it yourself'.  I have.  The wonders of Open Source.

--Mark Storer
  Senior Software Engineer
  Cardiff Software

#include <disclaimer>
typedef std::Disclaimer<Cardiff> DisCard;

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Michael Gantman
Sent: Wednesday, August 09, 2006 2:20 AM
To: [email protected]
Subject: [iText-questions] Inconsistency in PDF RTF and HTML

Hello.
I have created a Document in iText and registed it with PDF, RTF and HTML writers. For some reason the resultant PDF RTF and HTML files look very inconsistent. PDF file actually looks as expected. HTML file doesn't display any changes that were made for borders i.e. if I set a border of a particular cell a 7 point thick and set it to a particular color it is not reflected in HTML. RTF has the same problem as HTML, plus in addition it does not show any images that were added to some cells. I was hoping to use iText to create uniformed docs in PDF RTF and HTML but it looks not too promising. Is there anything I can do to make docs look the same? At the moment I try to immitate an existing HTML with CSS as a proof of concept. but I build my document from scratch not using CSS available. Is it possible to create a Document using CSS? I saw the email on this list refering to class HTMLWorker. Can someone provide a sample how to do this? Or may be there is a way to convert existing HTML + CSS file into PDF and RTF files. Attached are the tree files that are produced from the same Document and show the inconsistencies described above.
 
Also I found a small bug. If I add an Image into chunk and then set of chunks into Paragraph and then add Paragraph into cell which has bottom allignment and bottom border set to 7 and padding set to 3, the cell ignores thickness of the border and calculates padding is if border had thickness 1. So the images overlap with the border.
 
Best regards,
Michael Gantman
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to