Hi.
How to convert DOC, XLS files into PDF using Java API. Plz advice if
any already worked on this kind of. Thx.
Best
Ravi.
> Hi.
>
> How to convert DOC, XLS files into PDF using Java API. Plz advice if
> any already worked on this kind of. Thx.
> Best
> Ravi.
There is a project, POI, to read and write DOC and XLS files with Java.
There is also an existing package, iText, to write _new_ PDFs with Java.
However, I'm not aware of any way to _CONVERT_ DOC or XLS files to PDF
directly. Naturally, that doesn't mean that there is no way to convert them,
just that I don't know of any such tool.
You can find the POI project here: http://jakarta.apache.org/poi/. You'll
find that the ability to write XLS files is apparently fairly mature but
that the ability to write DOC files is still fairly primitive.
You can find the iText project here: http://www.lowagie.com/iText/.
Perhaps you could use POI to read your DOC and XLS files into a Java
program, extracting the relevant pieces of text, then writing them out again
in PDF format. I've never used POI, even for the most trivial of documents,
but I have been quite happy with iText so this approach _might_ work if POI
will co-operate.....
---
Rhino
Oliver Wong - 26 Jan 2006 16:25 GMT
>> Hi.
>>
[quoted text clipped - 20 lines]
> documents, but I have been quite happy with iText so this approach _might_
> work if POI will co-operate.....
I believe POI was used on a project in which I was involved (though I
did not directly use POI itself). From what I could see, POI would only give
you a logical view of the data, and, i.e. not a physical view. For example,
you could get the contents of cell (3:2), but there was no direct facility
for determining how wide the resulting string would be should you draw it
onto some surface, for example. I guess you could, though, extract the font
the value was written in, since that kind of info seems to be persisted by
Microsoft Excel.
So you MAY need to write a rendering engine in between POI and iText.
- Oliver
pachi - 26 Jan 2006 16:41 GMT
Try http://www.gohtm.com/ The have a SDK for it
> > Hi.
> >
[quoted text clipped - 23 lines]
> ---
> Rhino
> Hi.
>
> How to convert DOC, XLS files into PDF using Java API. Plz advice if
> any already worked on this kind of. Thx.
> Best
> Ravi.
If you can get the data out of the DOC files,
the Apache FOP project can convert XSL-FO documents to PDF
http://xmlgraphics.apache.org/fop/

Signature
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Ravi Velamuri - 30 Jan 2006 18:15 GMT
May be i can put more clarity on the content that I am trying to
convert into PDF "my doc file will have text and images also".
if not using POI, any better idea..?Thx always.
-Ravi
Ravi Velamuri - 30 Jan 2006 18:15 GMT
May be i can put more clarity on the content that I am trying to
convert into PDF "my doc file will have text and images also".
if not using POI, any better idea..?Thx always.
-Ravi