Number: 1679
Title: PDF output empty or hidden text
Submitter: Mark Diekhans
Date: Tue Jun 30 07:56:04 2009
Subsys: Dot
Version: 2.22.2
System: *-*-
Severity: major
Problem:
pdf created with no visible content.

When dot is run on linux, the pdf does is blank when view with acroread or xpdf. When run, on OS/X, the graph is visible in Preview, but not acroread. Acrobat indicate the graph is hidden text.
Input file: b1679.dot
Output file: b1679.pdf
Comments:
[erg] I'm guessing that the problem is the size of the layout, which is 57958 x 4040. The PDF standard limits both dimensions to 14400. As your drawing is 67 feet wide, you might want to use the size attribute to scale it down. You can then use a viewer to zoom in for more detail.

I don't know why cairo (or ps2pdf) does not produce a warning.

To me the odder fact is that the linux output is 10 times bigger than the mac output.

[ellson] I think older versions of cairo resorted to images in the PDF for "correctness". Later versions of cairo have eliminated most of these.

Mark's pdfs -


  350357  linux.pdf
    43397  mac.pdf

On Fedora 11 with latest graphviz snapshot built with cairo-1.8.6, I get


    78996 tree062909.pdf

PDFs are vector output, so we don't catch the large size with the checks we have for bitmap images. We could to add a check for 14400 into plugins/pango/gvrender_pango.c if you like?

[mark] It would be create if graphviz could prevent the creation of invalid PDFs. Cairo falling back to a bitmap isn't a good response, IMHO, since if I wanted a bitmap, I would have ask for it. I would actually make this an error rather than a warning, as these problems are hard to track down and graphviz is often used in non-interactive scripts.
Owner: erg
Status: Fixed (30 Jun 2009)