Page 1 of 1

Convert DOCX to XSL

PostPosted: Mon Mar 17, 2014 1:04 pm
by agustin.carban
Hi !. I would like to know if with this library I can convert a docx file into an xsl file ?. In a project I was given... They are using RTF files as templates with a certain API that doesn't support DOCX files instead... So due to this fact... I was looking for an API that supports this type of conversion so that I can genereate PDF onwards...

I beg that yes... Cheers

Re: Convert DOCX to XSL

PostPosted: Mon Mar 17, 2014 4:20 pm
by jason
You mean DOCX to XSL FO? The answer to that is yes.

Code: Select all
      // Document format:
      // The default implementation of the FORenderer that uses Apache Fop will output
      // a PDF document if nothing is passed via
      // foSettings.setApacheFopMime(apacheFopMime)
      // apacheFopMime can be any of the output formats defined in org.apache.fop.apps.MimeConstants eg org.apache.fop.apps.MimeConstants.MIME_FOP_IF or
      // FOSettings.INTERNAL_FO_MIME if you want the fo document as the result.
      //foSettings.setApacheFopMime(FOSettings.INTERNAL_FO_MIME);


See further https://github.com/plutext/docx4j/blob/ ... utPDF.java

Re: Convert DOCX to XSL

PostPosted: Mon Mar 17, 2014 10:09 pm
by agustin.carban
First of all... Thankx for answering me !. The thing is, like I said, that I have to combine the RTF File template and the data from an excel file... That could be done ?... The steps I plan to do are:
1. Convert DOCX template into XSL
2. Fill XSL with data from the excel file
3. Generate PDF file

That would repeat according to the rows I have in the excel file... Then I'd use one utility to merge all the PDF's in one... To be more clear... The excel file has data from people with debts and the docx file has the template from the credit card company... Well... Thankx again dude... :D