Giter VIP home page Giter VIP logo

Comments (6)

yuchen99 avatar yuchen99 commented on June 4, 2024 3

···
#foreach($developer in $developers)
$developer.Image
#end
···
just out put fr.opensagres.xdocreport.document.images.FileImageProvider@457e2f02

from xdocreport.

angelozerr avatar angelozerr commented on June 4, 2024 2

Imagine that Developer class returns an image (inputStream or IImageProvider )

Create a template image in your docx (see https://code.google.com/p/xdocreport/wiki/DocxReportingJavaMainDynamicImage) and add loop start/end :

#foreach($developer in $developers)
  $developer.Image
#end

And after mark the developer image field as image.

metadata.addFieldAsImage("developer.Image");

or you can use @FieldMetadata annotation https://code.google.com/p/xdocreport/wiki/FieldsMetadataTemplate. If I remember you have an @imageMetadata

from xdocreport.

angelozerr avatar angelozerr commented on June 4, 2024

None answer, I close this issue.

from xdocreport.

goraxan avatar goraxan commented on June 4, 2024

Not working, it outputs fr.opensagres.xdocreport.document.images.FileImageProvider@... as @yuchen99 said

from xdocreport.

fahadmaq007 avatar fahadmaq007 commented on June 4, 2024

I had a tough time trying to figure out what's going on. Had similar issues as @yuchen99 and @goraxan. Happy to share that I finally managed to got it working. Initially I was trying to load the image from Map<String, Object>, when changed it to normal POJO (like DeveloperWithImage.java), it started working. metadata.load( "photos", Photo.class, true );

An article is shared here

from xdocreport.

gladshop avatar gladshop commented on June 4, 2024

···
#foreach($developer in $developers)
$developer.Image
#end
···
just out put fr.opensagres.xdocreport.document.images.FileImageProvider@457e2f02

I have same problem, does you have any way to fix this problem?

from xdocreport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.