how to insert output of a javascript command into pdf report created by java application
<p>I am working on a java application, which asks for a url as input, and outputs some analyses on that site url, into a pdf report.</p>

<p>I want to add the number of facebook likes for that url/domain, to the pdf report.</p>

<p>At the facebook site, I searched and found the following code sample (in javascript) that obtains this data--</p>

<p>Javascript code--</p>

<pre><code>&lt;h1&gt;Number of likes-&lt;/h1&gt;
&lt;fb:like href="http://www.fbrell.com"&gt;&lt;/fb:like&gt;
</code></pre>

<p>The output looks like this (in a regular web page)--</p>

<pre><code>Number of likes-

Like 14,296 people like this. Be the first of your friends.
</code></pre>

<p>Note that for 'Like' an image with Like written on it, is shown.</p>

<p>I just want to put the number of people figure for number of likes, to be shown in my pdf report. Currently the java application is a desktop application, but can be converted into java web application with minimal effort. I am using the itext library for creation of pdf.</p>

<p>Is there some way to obtain the data as shown above, for output into the report.</p>
