You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by kevin94 <le...@gmail.com> on 2013/07/30 10:01:06 UTC

Render email with Javascript

Hello,

I'm trying to render an email with ComponentRenderer but the javascript
which build charts is not executed.
Are there any solution to execute javascript (which builds svg charts)
before getting the html in String ?

Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Render-email-with-Javascript-tp4660534.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Render email with Javascript

Posted by Marco Springer <ma...@glitchbox.nl>.
I've used jasper reports for functionality like that.
http://community.jaspersoft.com/

All it really requires is a jrxml file that can be turned into a jasper file.
This in turn can be fed with data to produce charts or whatever.
This jrxml can be "designed" with iReport, which is also freely downloadable.

There is even a wicketstuff-jasper project to make things even easier to 
intergrate things.

Cheers,
Marco

On Tuesday, July 30, 2013 01:51:55 AM kevin94 wrote:
> In fact, my goal is to render the page in String to render it after in a PDF
> file attach to the mail.
> 
> 
> 
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Render-email-with-Javascript-tp4
> 660534p4660539.html Sent from the Users forum mailing list archive at
> Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Render email with Javascript

Posted by Martin Grigorov <mg...@apache.org>.
My best experience with PDF generation out of HTML is with
http://search.maven.org/#search%7Cga%7C1%7Cflying-saucer-pdf.
But I don't think it supports neither JS nor SVG out of the box.
See
http://stackoverflow.com/questions/10437234/java-itext-flying-saucer-convert-html-containing-svg-tags-to-pdf


On Tue, Jul 30, 2013 at 10:51 AM, kevin94 <le...@gmail.com> wrote:

> In fact, my goal is to render the page in String to render it after in a
> PDF
> file attach to the mail.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Render-email-with-Javascript-tp4660534p4660539.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Render email with Javascript

Posted by kevin94 <le...@gmail.com>.
In fact, my goal is to render the page in String to render it after in a PDF
file attach to the mail.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Render-email-with-Javascript-tp4660534p4660539.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Render email with Javascript

Posted by Martin Grigorov <mg...@apache.org>.
On Tue, Jul 30, 2013 at 10:26 AM, kevin94 <le...@gmail.com> wrote:

> Hi,
>
> I'm looking in this direction.
>

I think you should drop this idea.
Some users use web email clients - here you have some chance, but others
use desktop clients where the HTML renderer may not be fully functional
browser and your JS may not be executed at all.


>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Render-email-with-Javascript-tp4660534p4660536.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Render email with Javascript

Posted by kevin94 <le...@gmail.com>.
Hi,

I'm looking in this direction.

Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Render-email-with-Javascript-tp4660534p4660536.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Render email with Javascript

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

ComponentRenderer just produces the final markup out of a page/component.
You need to "run" this markup in a browser to execute any JavaScript in it.


On Tue, Jul 30, 2013 at 10:01 AM, kevin94 <le...@gmail.com> wrote:

> Hello,
>
> I'm trying to render an email with ComponentRenderer but the javascript
> which build charts is not executed.
> Are there any solution to execute javascript (which builds svg charts)
> before getting the html in String ?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Render-email-with-Javascript-tp4660534.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>