I have solved this issue now :) (Java Documentation must be updated with right example)
<code> Asset asset = new Asset( "text/html", "<b>some data</b><img src="static/icon.gif"/ >".getBytes(), "testfile.html"); byte[] image_data = // Read your image into bytes[] array; Asset subAsset = new Asset( "image/gif", image_data, "static/icon.gif"); List<Asset> assetsList = new ArrayList<Asset>(); assetsList.add(asset); assetsList.add(subAsset); Document document = new Document(assetsList); </code> Cheers, Raj On Jan 4, 5:31 pm, RAJ <er.rajes...@gmail.com> wrote: > Hi All, > > I am trying to produce pdf reports out of my html String as mentioned > in below tutorial: > > http://code.google.com/appengine/docs/java/conversion/overview.html > > <code> > > // Create a conversion request from HTML to PNG. > Asset asset = new Asset( > "text/html", "<b>some data</b>".getBytes(), "testfile.html"); > Document document = new Document(asset); > > </code> > > My HTML String has few pictures to be embedded. Thus, I am trying > "Additional Functions (Adding Assets)" example to add images as sub > asset. > > But, example mentioned in tutorial is wrong. I am not able to add > image as sub-asset in my main html string. There is no java api > mentioned for the same! > > Has someone done this earlier using Java? (Example in python is > correctly described) > > Cheers, > Raj -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.