Page 1 of 1

How to print a docx file to a printer?

PostPosted: Sat Dec 24, 2011 8:02 pm
by Cherrot
Recently I'm planning to develop a web service that could print any docx files to a printer.
By comparing many open source libraries (i.e. Apache POI, OpenOffice API, docx4j, etc), I choose docx4j to process docx files. However, I have no clue of how to process a docx file so that the printer could "recognize" it.
I'm a newbie here :) Do I need to convert the docx files to PDF or other format to do that?

Any suggestion is appreciate.
Thanks in advance!

Re: How to print a docx file to a printer?

PostPosted: Tue Dec 27, 2011 11:38 am
by jason
Well, you'll need to convert the docx to a format a printer can recognise, eg ultimately, PCL or Postscript (though maybe this is abstracted away in your architecture?)

As an intermediate format, you can convert your docx to PDF or HTML (I assume you support those already).

If you are already using OpenOffice to print other file formats, I'd suggest you consider using it for docx as well.