flot and Prince XML?

39 views
Skip to first unread message

Alain Frisch

unread,
Feb 27, 2015, 11:22:37 AM2/27/15
to flot-...@googlegroups.com
Hi all,

Prince XML is a great tool that generates nice paginated PDF documents from HTML sources.  It comes with a javascript engine, which is "almost" enough to deal with flot charts, but not completely.  I don't know the details, but according to the authors of Prince XML, this is because flot needs to access dynamic sizes:

I think these issues come from Prince running JavaScript before layout, so it cannot report accurate sizes and positions via the various DOM properties. We may be able to improve this in the future, without supporting full browser-style reflow. In the meantime, scripts will require some adjustments to work well with Prince, or they can be run in another tool (PhantomJS?) to generate SVG to convert with Prince.

(from http://www.princexml.com/forum/topic/2351/prince-9-released?p=1#14026 )

We have managed to get the basic Flot example that you posted earlier rendering in an experimental build of Prince, but the graph appears too small due to a width issue caused by jQuery. Resolving all of these issues is tricky, and may require some cooperation with the library authors, as Prince is fundamentally different from web browsers in some ways.

I'm wondering if by any chance,

  (i) some users have already come up with a way to make flot and Prince interact nicely (e.g. by hard-coding some sizes in flot scripts)

  (ii) flot developers would be willing to cooperate with Prince XML ones to facilitate this interaction

?


Best regards,

Alain Frisch
Reply all
Reply to author
Forward
0 new messages