Shrimp007 / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

How to list template's fields before process the merge #475

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi 

I'm using xDocReport 1.0.4 and I'm discovering it

I'm using 
fr\opensagres\xdocreport\samples\docxandfreemarker\DocxProjectWithFreemarkerAndI
mage.java  
for my test and I'm trying to list the freemarker of the template before any 
process.

I can list text freemarker with the method : 

--------------------------------------------------------------------------------
----
FieldsExtractor<FieldExtractor> extractor = new 
FieldsExtractor<FieldExtractor>();
report.extractFields(extractor);
List<FieldExtractor> fields = extractor.getFields();
for(FieldExtractor field : fields) {
    String fieldName =  field.getName();
    System.out.println(fieldName);
}
--------------------------------------------------------------------------------
----
Console : 
project.name
--------------------------------------------------------------------------------
----

I can see 'project.name' freemarker, but not all images (logo, 
originalSizeLogo, forcedSizeLogo, ... ) 

How can I list all variable of the template ?

My aim is to read a template, list all freemarkers, show them to the user, ask 
him to associate them to a text or an image , and them generate the result in 
docx, then in pdf.

Do you think it is possible with xDocReport ?

And if all of this is possible, can I read the size of the template's image in 
the aim to generate the new image with the same size ?

Thanks a lot for reading my issue

Regards

Original issue reported on code.google.com by millon.j...@gmail.com on 23 Apr 2015 at 1:50

GoogleCodeExporter commented 9 years ago
Please create your issue at https://github.com/opensagres/xdocreport/issues

Original comment by angelo.z...@gmail.com on 23 Apr 2015 at 1:53

GoogleCodeExporter commented 9 years ago
Done

Original comment by millon.j...@gmail.com on 23 Apr 2015 at 2:01