I did a quick test with the latest Velocity plugin, and it worked fine.
Now, I didn't know the html containing the offending tag was actually generated by getChart(). If eastwood is returning an image, you don't even have to use $htmlize() or try to replace any characters. Just place the variable in your template and it should work (in my template below: $!pieChart). This is because the PDF will be produced AFTER the image was retrieved and has been embedded, so no $ character should be in the html...
So my guess is that the image was not found, and couldn't replace the img tag, which means you probably don't have the eastwood.war installed.
FYI. the template I tested was:
- Code: Select all
<html><body style="width: 100%; height: 100%;">$!pieChart</body></html>
The chart object definition was:
- Code: Select all
{"width":400,"height":280,"title":"Title","titleSize":18,"threeD":true,"shadow":false,"proportional":true,"labelFontSize":10,"slices":[{"percent":29.5,"color":"#FF0000","label":"Thirty","legend":"Thirty"},{"percent":25,"color":"#00FF00","label":"Twenty-Five","legend":"Twenty-Five"},{"percent":15.5,"color":"#0000FF","label":"Fifteen","legend":"Fifteen"},{"percent":10.2,"color":"#FF00FF","label":"Five","legend":"Five"},{"percent":19.8,"color":"#00FFFF","label":"Twenty","legend":"Twenty"}],"orientation":45,"transparency":100}
The html rendered for the PDF was:
- Code: Select all
<html><body style="width: 100%; height: 100%;"><img src="http://localhost:8183/eastwood/chart?cht=p3&chp=45.0&chtt=Title&chs=400x280&chts=000000,18&chd=e%3AS4QAJ7GiMr&chco=FF0000,00FF00,0000FF,FF00FF,00FFFF&chl=Thirty%7CTwenty-Five%7CFifteen%7CFive%7CTwenty&chdl=Thirty%7CTwenty-Five%7CFifteen%7CFive%7CTwenty&lfs=10&xp=1&ewr=1" border="0" class="chart" width="400" height="280"></img></body></html>
See the attached PDF for the result.
So my guess is that you don't have eastwood.war installed. You need to put it in /application_server/server/webapps/
You can test it by opening a browser and testing the URL produced by the object returned by getChart() (in your case "http://127.0.0.1:8184/eastwood/chart?chbh=r&cht=bvg&chxt=y.etc.")