Jeremias Maerki wrote:

Philippe Drix made me look into why his borders don't show up properly
in Acrobat Reader and his printer.

He specified border widths as 0.002cm: 0.002cm = 0.0567pt = 0.02mm

:o I don't think this is a valid use case. Why would anyone want a border so thin??? Just tell Philippe to widen his border to say 0.5pt. Or provide a real world example of why such a thin border is required.


At 600dpi one dot/pixel is 1/600in = 0.00166666in = 0.12pt = 0.0423mm

So the border is less than half a pixel wide at 600dpi which is the
nominal resolution for most laser printers today. Even at 1200dpi you
don't have a full pixel, yet.

Yes I know. Precisely why I don't think anything less than 0.5pt is a valid use case.


Digging into the source code, I found out: In FOP 0.20.5 horizontal and
vertical lines are painted as rectangles (0.056pt wide). In FOP 0.92beta
we're painting these lines as lines (0.056pt wide). So it appears that
Acrobat Reader handles the two differently. Apparently, it cannot be
said that FOP does something wrong per se. But the question pops up if
we should change the way we paint horizontal and vertical lines as part
of our border painting code.

Actually I played a part in changing the border drawing code from rectangles to lines. Using a rectangle to draw a line didn't seem correct to me, when PDF provides a perfectly good line drawing command.


There's another thing. PDF allows to specify "0" as line width which
should result in 1 pixel on the target device. From the PDF Reference:
"However, some devices cannot reproduce 1-pixel lines, and on
high-resolution devices, they are nearly invisible. Since the results of
rendering such “zero-width” lines are device-dependent, their use is not
recommended." It would also be questionable how exactly we would
determine when to use "0" as line width. Probably not the best of ideas.

WDYT?

I don't think FOP does anything wrong, so I'd leave it.

Chris


Reply via email to