Closed GoogleCodeExporter closed 9 years ago
fields extractor is used just to retrieve simple field name ${name}. It doesn't
work for image.
Original comment by angelo.z...@gmail.com
on 12 Nov 2014 at 1:49
so, how read the dynamic image fieds from the docx ?
Original comment by coralie....@gmail.com
on 12 Nov 2014 at 2:02
> so, how read the dynamic image fieds from the docx ?
You cannot. FieldsExtractor was created just for our demo : after uploading a
docx you have a form which display simple text field to fill teh data model.
In real case, the data model should be known, so you need not to use
FieldsExtractor.
Original comment by angelo.z...@gmail.com
on 12 Nov 2014 at 2:08
ok, thanks. (In my case, the model isn't be known by the application because
it's dynamic)
Original comment by coralie....@gmail.com
on 12 Nov 2014 at 2:15
hello Angelo
think you develop the feature that allows you to extract images from template?
I think it would be useful because in the context of an application that uses a
template to generate a docx, the application does not know which fields to
fill. extractFields helps to know the text fields to fill in, but not the
images.
What do you think?
Original comment by coralie....@gmail.com
on 13 Nov 2014 at 9:57
Hi Coralie,
> think you develop the feature that allows you to extract images from template?
No sorry -(
Simple fields and dynamic images are very different :
* simple field use standard Velocity/Freemarker syntax. So extractor uses the template engine to retrieve the fields name.
* dynamic image works with image+bookmark (to name image) and you must use FieldsMetadata to tell to XDocReport that image+bookmark should be replaced with dynamic image.
So you could have an image+bookmark and XDocReport could not replace the image.
To know if image must be replaced, FieldsMetadata must be used. So the image
name comes from FieldsMetadata.
After you could tell me, that you wish to retrieve names from the whole
image+bookmark. To do that, you cannot use template engine. It's specific to
docx. So you could use perhaps use POI to retrieve bookmark name.
Original comment by angelo.z...@gmail.com
on 13 Nov 2014 at 11:06
Original issue reported on code.google.com by
coralie....@gmail.com
on 12 Nov 2014 at 1:28