Comment 1 for bug 1132838

Revision history for this message
Kyle MacFarlane (kyle-deletethetrees) wrote :

I've just run into this problem.

Zoom level makes no difference for me in any PDF with any viewer but it's not uncommon for thin lines to appear and disappear at various zoom levels in PDFs.

The ReportLab PDF always displays and prints fine, but I get these results from the expected and actual PDFs.

Adobe Reader 11.0.2 on Windows 8 shows and prints the borders.

Adobe Reader 11.0.2 on OSX 10.8.2 shows the borders but does not print them.

Chrome 25.0.1364.97 on Windows 8 shows the borders but does not print them except for a small bit in the top left of page 1 (I only ever printed page 1 while testing).

Safari 6.0.2 on OSX 10.8.2 doesn't show or print the borders.

Apple Preview 6.0.1 is the same as Safari, possibly they're actually the same viewer?

It turns out that it's easy to fix. Change line 503 in z3c.rml.stylesheet to the following:

        args += self.getAttributeValues(ignore=('kind',), valuesOnly=True, includeMissing=True)

Since all the args are eventually used in ReportLab as positional arguments then the missing values need to be included or the value for dash will end up as an integer instead of a list or None. Seemingly Reader on Windows can cope with that mistake but practically every other viewer doesn't render the borders because they're invalid.

Funnily, this Chromium bug about PDFs generated by Google Spreadsheets seems to be the same thing: https://code.google.com/p/chromium/issues/detail?id=155038