You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Michael Bruns <mi...@schlund.de> on 2006/11/06 09:45:31 UTC

FOP 0.92 and RTF

Hi,

one of our product managers had the "brilliant" idea to support both PDF
and RTF for some documents so that our customers can mess up the
documents we generate to their liking...yeah, whatever.

As I said we already have a working environment which generates PDF from
XML via XSL-FO with the help of FOP 0.92, and I was pleased to see that
FOP also supports RTF because I really like FOP and the way it works :-)
 So what I tried was (heavily stripped down) the following:

Fop rtfFop = fopFactory.newFop(MimeConstants.MIME_RTF, rtfOut);
Source rtfSource = new DOMSource(doc);
Result rtfResult = new SAXResult(rtfFop.getDefaultHandler());
transformer.transform(rtfSource, rtfResult);
rtfFop.close();

Well, it works...somehow ;-) It really produced an RTF-document, but all
the beautiful design that my PDFs contain was missing - no tables,
regions, absolute positions...

I understand that this is not the way you show in your examples, where
you use stuff like "RtfTable tbl = foo.newTable(bar);". But my question
is now anyway: Will the way I want to use RTF-generation ever be
completely supported by FOP? I.e. will there be a chance to have just
_one_ XSL-FO which I can use for both PDF and RTF?

If not, I have a strong argument against the product manager - if
yes...well, some more work for me ;-)

Thanks in advance!

Cheers,

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.92 and RTF

Posted by mahmoudi ould abdel vetah <ma...@gmail.com>.
hi,

i'm not sure but you can try with itext
http://sourceforge.net/projects/itext/ or pdfbox http://www.pdfbox.org/!

if you want a commercial tool, you can try this one
http://www.01net.com/telecharger/windows/Bureautique/editeur_de_texte/fiches/27858.html

(but i hope you speak french ;))

good luck.



2006/11/6, Michael Bruns <mi...@schlund.de>:
>
> Hi Jeremias,
>
> thanks for your answer :-) You told me what I already had expected.
>
> On 06.11.2006 15:12, Jeremias Maerki wrote:
> > On 06.11.2006 09:45:31 Michael Bruns wrote:
> >> Hi,
> >>
> >> one of our product managers had the "brilliant" idea to support both
> PDF
> >> and RTF for some documents so that our customers can mess up the
> >> documents we generate to their liking...yeah, whatever.
> >
> > I know about product managers. :-)
>
> Who doesn't?!? ;-)
>
> > [...]
> > Yeah, well, the RTF output doesn't have the same quality as PDF. The RTF
> > handler itself is probably not that advanced itself but in addition to
> > that there are some things in XSL-FO that simply cannot be expressed in
> > RTF. So RTF is definitely not a complete alternative to PDF output. With
> > some investment the RTF output can certainly be improved but only to a
> > certain degree. Also keep in mind that RTF is not a very beautiful
> format
> > (to use some nice words) and should IMO not be used for new projects. If
> > you need to be able to change the generated file in a word processor I'd
> > try to find out if the Open Document Format is a possibility. That's a
> > better investment in the future. But FOP does not yet produce ODF.
>
> Well, I think I heard myself saying something very similar to our
> product manager... ;-)
>
> Anyway, his wish is that our customers can edit the documents we
> originally generated as PDF - and without buying some licenses from
> Adobe, of course. So, I know that this question is a little off-topic,
> but if anybody know a nice Java library which can convert PDF to
> DOC/RTF/HTML/whatever (as long as the user can edit it
> with...well...Word), any help is very much appreciated :-) Google and
> its colleagues mainly pointed me to some obscure shareware sites and I
> didn't find anything helpful, yet.
>
> Thanks again in advance :-)
>
> Cheers,
>
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: FOP 0.92 and RTF

Posted by Michael Bruns <mi...@schlund.de>.
Hi Jeremias,

thanks for your answer :-) You told me what I already had expected.

On 06.11.2006 15:12, Jeremias Maerki wrote:
> On 06.11.2006 09:45:31 Michael Bruns wrote:
>> Hi,
>>
>> one of our product managers had the "brilliant" idea to support both PDF
>> and RTF for some documents so that our customers can mess up the
>> documents we generate to their liking...yeah, whatever.
> 
> I know about product managers. :-)

Who doesn't?!? ;-)

> [...]
> Yeah, well, the RTF output doesn't have the same quality as PDF. The RTF
> handler itself is probably not that advanced itself but in addition to
> that there are some things in XSL-FO that simply cannot be expressed in
> RTF. So RTF is definitely not a complete alternative to PDF output. With
> some investment the RTF output can certainly be improved but only to a
> certain degree. Also keep in mind that RTF is not a very beautiful format
> (to use some nice words) and should IMO not be used for new projects. If
> you need to be able to change the generated file in a word processor I'd
> try to find out if the Open Document Format is a possibility. That's a
> better investment in the future. But FOP does not yet produce ODF.

Well, I think I heard myself saying something very similar to our
product manager... ;-)

Anyway, his wish is that our customers can edit the documents we
originally generated as PDF - and without buying some licenses from
Adobe, of course. So, I know that this question is a little off-topic,
but if anybody know a nice Java library which can convert PDF to
DOC/RTF/HTML/whatever (as long as the user can edit it
with...well...Word), any help is very much appreciated :-) Google and
its colleagues mainly pointed me to some obscure shareware sites and I
didn't find anything helpful, yet.

Thanks again in advance :-)

Cheers,

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP 0.92 and RTF

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 06.11.2006 09:45:31 Michael Bruns wrote:
> Hi,
> 
> one of our product managers had the "brilliant" idea to support both PDF
> and RTF for some documents so that our customers can mess up the
> documents we generate to their liking...yeah, whatever.

I know about product managers. :-)

> As I said we already have a working environment which generates PDF from
> XML via XSL-FO with the help of FOP 0.92, and I was pleased to see that
> FOP also supports RTF because I really like FOP and the way it works :-)
>  So what I tried was (heavily stripped down) the following:
> 
> Fop rtfFop = fopFactory.newFop(MimeConstants.MIME_RTF, rtfOut);
> Source rtfSource = new DOMSource(doc);
> Result rtfResult = new SAXResult(rtfFop.getDefaultHandler());
> transformer.transform(rtfSource, rtfResult);
> rtfFop.close();
> 
> Well, it works...somehow ;-) It really produced an RTF-document, but all
> the beautiful design that my PDFs contain was missing - no tables,
> regions, absolute positions...

Yeah, well, the RTF output doesn't have the same quality as PDF. The RTF
handler itself is probably not that advanced itself but in addition to
that there are some things in XSL-FO that simply cannot be expressed in
RTF. So RTF is definitely not a complete alternative to PDF output. With
some investment the RTF output can certainly be improved but only to a
certain degree. Also keep in mind that RTF is not a very beautiful format
(to use some nice words) and should IMO not be used for new projects. If
you need to be able to change the generated file in a word processor I'd
try to find out if the Open Document Format is a possibility. That's a
better investment in the future. But FOP does not yet produce ODF.

> I understand that this is not the way you show in your examples, where
> you use stuff like "RtfTable tbl = foo.newTable(bar);".

That's only a valid example if you want to use the RTF library directly,
not when you want to convert XSL-FO.

> But my question
> is now anyway: Will the way I want to use RTF-generation ever be
> completely supported by FOP? I.e. will there be a chance to have just
> _one_ XSL-FO which I can use for both PDF and RTF?

For simpler documents, yes, but not for more complex documents.

> If not, I have a strong argument against the product manager - if
> yes...well, some more work for me ;-)
> 
> Thanks in advance!
> 
> Cheers,
> 
> Michael


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org