Raj, Thanks for noticing that; we've filed an issue to fix it.
-Amy On Thu, Jan 5, 2012 at 8:23 PM, RAJ <[email protected]> wrote: > 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 <[email protected]> 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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
