Thursday, October 22, 2009, 1:35:15 PM, Wurzelseppi wrote:
> Hi there,
>
> i´m pretty new at JODReports and tried to integrate a picture in an odt
> document.
>
> Could anyone explain the steps needed to accomplish that?
Wrong list... Ask the JODReports guys.
> 1. How to prepare the odt template ? Do i need a ${...} where the picture
> should be placed?
> 2. How to pass the picture to the template.create(...) method. I tried to
> pass an InputStream but freemarker just made an toStringK() on that :-)
As far as I can remember, ODT doesn't embed the image into the XML,
and so the XML should just *refer* to the image that is in the same
zip package. The FreeMarker template is most certainly just used to
generate the XML part (but it's not impossible that JODReports has
some custom FreeMarker directives to pull in images... I don't know
JODReports).
> Many thanks in advance.
>
>
> Greetings,
>
>
> Stefan
>
>
> Daniel Dekany wrote:
>>
>> Tuesday, May 12, 2009, 12:09:43 PM, Shervin Asgari wrote:
>>
>>> Sure, no problem.
>>>
>>> I can try to attach it here.
>>> As far as I can see it seems like adding an image produces an
>>> 'xlink:href' part in content.xml that links to the image and
>>> freemarker for some reason tries to parse it as xml.
>>
>> Ahhh... indeed, now I see it. *JODReports* tries to process that .jpg
>> file with FreeMarker. Now that's a bug in JODReports for sure.
>> FreeMarker itself doesn't try to do such thing alone. And the author
>> of JODReports surely didn't mean to do this either, because he don't
>> want to substitute anything inside images... so you have a JODReports
>> bug here.
>>
>>> But I am not sure. The problem could very well be in my application.
>>>
>>> Shervin
>>>
>>> Daniel Dekany wrote:
>>> Tuesday, May 12, 2009, 10:53:45 AM, Shervin Asgari wrote:
>>>
>>>
>>> Hello.
>>>
>>> I am using JODReports <
http://jodreports.sourceforge.net/>
>>> which is using Freemarker. I have an ODF template files and the template
>>> file has an image. However I get freemarker exception:
>>>
>>> Token manager error: freemarker.core.TokenMgrError: Lexical error at
>>> line 157, column 81. Encountered: "\u0004" (4), after : "" in
>>> Pictures/100000000000011B000001AFCD845EED.jpg
>>>
>>> Can someone clarify please?
>>>
>>>
>>> Um... the thing is, there should be nothing special with inserting an
>>> image; it's just done with plain XML tags like anything else in ODF.
>>> But something seems to confuse the FreeMarker parser around the place
>>> where the image happens to be... Could send the template attached? Or
>>> if that's not possible, could you produce a minimal template that
>>> reproduces the problem and send it attached?
>>>
>>>
>>>
>>
>> --
>> Best regards,
>> Daniel Dekany
>>
>>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>> i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled.
http://p.sf.net/sfu/kodak-com>> _______________________________________________
>> FreeMarker-user mailing list
>>
[hidden email]
>>
https://lists.sourceforge.net/lists/listinfo/freemarker-user>>
>>
>
--
Best regards,
Daniel Dekany
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user