It seems that most of the difference comes from the fact FOP converts pixels on a 72 dpi basis wereas most modern screens/browsers converts inches (or related units like points/pt) on a 96 dpi basis, as you mentionned.
Hense, shrinking everything that is in pixel units by 72/96= 3/4 in the fo stylesheet makes the HTML quite similar to PDF and the remaining differences seem to be explainable by character and line spacing. I'll try to equate these parameters in css and fo styles ... Could anyone confirm that FOP converts pixels using a 72 dpi ratio ? Hans ----- Original Message ----- From: "Hans Chicoine" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 09, 2003 5:35 PM Subject: Re: How do pixels(px) compare to points(pt) or inches in XSL-FO/FOP ? > Thanks for the quick answer Clay > > Would you also known what does FOP do with FOs that have dimensions in > pixels ? > > Are those dimensions converted in inches unsing some magical constant ratio > ? > > Maybe there's something in FOP docs or W3C's spec but I haven't found it ... > > Having the two infos : i) dpi (or dots per pt) for a screen and ii) inches > per pixel for fop... > > ... I could then calculated a correction coefficient > > Hans > > ----- Original Message ----- > From: "Clay Leeds" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, June 09, 2003 5:04 PM > Subject: Re: How do pixels(px) compare to points(pt) or inches in XSL-FO/FOP > ? > > > > On 6/9/2003 1:30 PM, Hans Chicoine wrote: > > > The context : -I have a HTML document, a newsletter, formatted a bit > > > like a newspaper's frontpage : blocks of text with arbitrary dimensions > > > in arbitrary positions on the page. -Block dimensions are fixed > > > (independant of text content) and specified in pixels. Texts in the > > > blocks have there font sizes given in points (pt = 1/72). -I'm > > > attempting the reproduce the same document in PDF using FOP. I'd like > > > everything in the PDF to be identical (at least proportional) to what it > > > is in the HTML document. The Problem : In my XSL-FO stylesheet I've > > > kept the same units : block dimensions in pixels(px) and font size in > > > points(pt) ... BUT it is quite obvious in the rendered PDF > > > that the ratios between block areas and the space taken up by the > > > texts ARE NOT the same in the HTML and in the PDF (typically more space > > > is taken by the text in the PDF). The question : Would anyone know > > > how to calculate a correction coefficient that reestablish the correct > > > proportionality ? I suppose that that implies knowing how points are > > > translated in pixels in a browser and how pixels are translated in > > > absolute dimensions (eg. inches) in a xsl-fo renderer. PS : I > > > suppose I could specify block dimensions in inches in my HTML document > > > ... but given the choice, I'd rather not do that. Hope I'm Clear ! > > > Hans > > > > I think part of this depends on the resolution (measured in dpi--dots > > per inch) being displayed on the monitor. IIRC, when Microsoft Internet > > Explorer 5.x first shipped on the Mac, Web Developers complained that it > > shipped with a default dpi of 96 (the default for PCs), whereas most > > designers were accustomed to the Mac's 72dpi default. This meant that > > pages designed at 72 dpi looked really small when viewed with Mac MSIE. > > To make up for the discrepancy, Mac MSIE defaulted to 16pt font. I don't > > know if/how this will help, but it might... > > > > Here're a few resources that will hopefully help: > > > > http://msdn.microsoft.com/workshop/author/dhtml/overview/highdpi.asp > > > > http://reviews.macnn.com/reviews/ie5/ie5.shtml > > > > Hope this helps! > > > > Web Maestro Clay > > -- > > Clay Leeds - [EMAIL PROTECTED] > > Web Developer - Medata, Inc. - http://www.medata.com > > PGP Public Key: https://mail.medata.com/pgp/cleeds.asc > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]