| Page 1 of 1 | [ 7 posts ] |
|
Hi,
I am actually using YUI 3.5.1 charts and YUI 2.8 dataTable on a web page, into a J2EE application without .HTML page. (I use .jsp / .java / .js). I would need to export this page, containing YUI, to a PDF. Do you have an idea of how I could do that ? I guess that if I can transform my charts and dataTable into images and treat this image on the server side, it would be easy to then make a .pdf using iText, for exemple. But how to transform YUI components into simple images ? Thank you |
Alberto SantiniYUI Contributor
|
Hello Antoine.
I think there is not a built-in solution in YUI. You may give a look at the following stackoverflow thread: http://stackoverflow.com/questions/9238 ... pg-png-pdf Hope that helps, IceBox |
|
Thank you for your answer Alberto!
I'm not sure I am really understanding the post you link though. Is there a simple way to transform YUI chart and dataTable into images ? |
Alberto SantiniYUI Contributor
|
Hello Antoine.
It seems there is not a built-in solution in YUI to export the charts in PDF. Stackoverflow users suggested in that thread a few tools. Of course your mileage may vary. Regards, IceBox |
|
As you can see I am not an experienced developper.
I don't see how transforming a html 5 canvas into a pdf is similar to my problem. If you have the patience to give my a track about it, I would be please though. Thank you. |
Alberto SantiniYUI Contributor
|
Hello Antoine.
As stated in the docs [1], based on device and browser capabilities, Charts leverages SVG, HTML Canvas and VML to render its graphical elements. (That means a chart may be a canvas). An example I found in that thread how to convert an image it is canvas2image [2]. I suppose there are other tools converting from SVG or VML. I gave you a general starting point because the solution depends on the app architecture and it is not related directly to YUI. Generally speaking, your approach may be feasable: I mean, creating on the frontend an image, transfering it to the server side and processing it to a pdf file. However, maybe, the roundtrip would be shorter if the pdf would be generated directly on the server side. My two cents, IceBox [1] http://yuilibrary.com/yui/docs/charts/ [2] http://www.nihilogic.dk/labs/canvas2image/ |
|
That's great thank you for your answers!
|
| Page 1 of 1 | [ 7 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group