Domanda

I'm using WickedPDF to generate PDF's from views in a Rails 3.2 app. I'm also using Twitter Bootstrap.

My pdfs contain images, to which I've applied class: 'img-circle'.

When I view the PDF as html (render pdf: "My PDF", show_as_html: true) the images are rendered as circles.

However, when viewing as a PDF the images are square.

Why are the image radii not displayed in the PDF version?

È stato utile?

Soluzione

The version of QT that wkhtmltopdf uses for the headless browser did not support this until very recently:

Here are bugs filed against the wkhtmltopdf and QT projects:

https://code.google.com/p/wkhtmltopdf/issues/detail?id=540

https://bugs.webkit.org/show_bug.cgi?id=56314#c6

I'm not sure if the latest wkhtmltopdf binaries are built against a new enough QT, but I'd download the very latest and test it out first:

http://wkhtmltopdf.org/downloads.html

If that still doesn't work, here's how to build a newer QT and compile a new wkhtmltopdf binary:

http://natepinchot.com/2014/01/31/building-static-wkhtmltopdf/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top