Questions tagged [xdocreport]

XDocReport is Java API to generate reports from a "template" docx or odt created with MS Word or OpenOffice/LibreOffice and convert it to another format like PDF/XHTML.

XDocReport is Java API to generate reports from a "template" docx or odt created with MS Word or OpenOffice/LibreOffice and convert it to another format like PDF/XHTML.

The docx, odt template uses mergefield/input field with Velocity/Freemarker syntax to manage field value to replace with Java value, loop, condition.

Report generation is the result of the merge between a "template" docx odt and Java context. It's possible to convert the report into PDF/XHTML format.

You can test XDocReport with live demo:

110 questions
16
votes
1 answer

XDocReport converting ODT to PDF with OSGI

To start to work with XDocReport I want to convert ODT to PDF. All my application is OSGi. So I install the following…
Pavel_K
  • 10,748
  • 13
  • 73
  • 186
5
votes
3 answers

Generate PDF files using iText and apache velocity template(.vm)

What is the general workflow to generate a PDF using iText and an Apache Velocity template file (.vm) in Java? I am interested in knowing steps like: parse template file, put Java object in context and steps to be performed to generate pdf etc. I…
TechnoCrat
  • 2,055
  • 4
  • 23
  • 35
4
votes
1 answer

Error generating pdf from docx with POI

I want convert a docx to pdf with apache poi, the docx is generated correctly with docx4j. The conversion work fine with simple document, but when I want to convert a more stylized document, POI throws an…
Clement Cuvillier
  • 227
  • 1
  • 7
  • 24
3
votes
1 answer

xDocReport - Impossible to create report for the input stream

I cannot manage with this problem. The source is: try { // 1) Load Docx file by filling Velocity template engine and cache it to the registry InputStream in = new FileInputStream("/test.docx"); IXDocReport report =…
robson
  • 1,623
  • 8
  • 28
  • 43
3
votes
1 answer

XDocReport : XDocConverterException: Cannot find converters from=DOCX

I'm testing the sample code from XDocReport. And I combined, creating a docx and pdf report based on a docx template. However I keep on getting this message Apr 21, 2016 5:39:10 PM fr.opensagres.xdocreport.converter.ConverterRegistry…
user3714598
  • 1,733
  • 5
  • 28
  • 45
3
votes
0 answers

Use Barcode (code128.ttf) in Freemarker via odt template

I'm trying generate PDF file via Freemarker with odt template. I added font code128.ttf in my OS (Windows 7) I created ODT template in Microsoft Office Word 2010. In this template i created field: ${MyBarcode.stringForBarcode}, and applied font…
Sprinter
  • 717
  • 5
  • 11
3
votes
1 answer

How to convert odt to docx with xdocreport?

I use xdocreport 1.0.3 and I want to upload an odt template, process it and finally to get an docx processed document. How can I do this? I tried this: public void generateUserReport(long pcCaseId, long currentUserId) throws CMSException{ try { …
Filosssof
  • 1,288
  • 3
  • 17
  • 37
3
votes
0 answers

How to populate a template docx or odt in android with library?

I'm making an android app and I want to fill a table template inserted in to a docx document. I'm trying the XdocReport library but I can't accomplish. I also read about JODRreports and Docx4j but I don't find info about using on Android. Other…
pablogupi
  • 774
  • 11
  • 27
2
votes
0 answers

generation of a pdf file from odt with java and xdocreport

I am using Java and xdocreport to edit .odt files (template) and save it as odt. Everything working fine but when I try to convert the odt to pdf I get this error: ODFConverterException: java.lang.ClassCastException: Insertion of illegal Element:…
sesh-777
  • 23
  • 1
  • 6
2
votes
2 answers

Populating tables with templates in xdocreport

I am using the following template for populating a table while using the xdocreport library The Java code that I am using is given below: InputStream in = GenerateStakeholderReport.class.getResourceAsStream(…
Diptendu Dutta
  • 331
  • 1
  • 3
  • 12
2
votes
0 answers

Was OpenSagres allowed to use Apache POI-like packages?

While searching for a free solution to implement a DOC(x)-to-PDF transformation for an internal business application, I stumbled upon the org.apache.poi.xwpf.converter.* packages. I found some examples…
maxxyme
  • 2,164
  • 5
  • 31
  • 48
2
votes
2 answers

null values showing velocity script instead of empty

I have Invoice object which contains some fields like invoice number, date, customer etc.., I like to print my invoice data for that I used opensagres.xdocreport api. In this process I used Velocity Template Engine. If invoice object has no data for…
Siva kumar
  • 215
  • 4
  • 13
2
votes
2 answers

How to set font in XDocReport using HTML Syntax?

I'm currently using XDocReport 1.0.3 to generate Reports in docx format. When using it with SyntaxKind.HTML I can not get the used font family to be displayed properly in the output document. I figured that there are basically 2 different…
Markus
  • 1,016
  • 1
  • 8
  • 23
2
votes
2 answers

Generate document from docx template with conversion to PDF - text overlaps each other

I have a strange problem. In my application I have couple .docx template. Genering .docx files works fine but when I convert those to .PDF text behave strange. This is .docx file: and .PDF file looks in that way: I using xdocreport library with…
plancys
  • 3,833
  • 2
  • 19
  • 26
2
votes
2 answers

How to change font encoding when converting docx -> pdf with docx4j?

When I'm a converting docx document to pdf my national characters transform into "#" marks. Is there any way to set a font encoding for pdf documents? I used xdocreport in the past and it can handle that, but I had problems with images, headers and…
robson
  • 1,623
  • 8
  • 28
  • 43
1
2 3 4 5 6 7 8