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 sareth <gw...@hotmail.com> on 2012/12/06 13:13:32 UTC

using FOP to convert RTF to FO

hello, I currently use FOP 0.95 and I would like to know if it's possible to
convert RTF to FO with pictures ?

I found two tools that can do the job but they aren't free:
http://www.rtf-to-xml.com/ <http://www.rtf-to-xml.com/>  
http://rtf2fo.com/index.html <http://rtf2fo.com/index.html>  

please can you help me ?

regards,
Sareth



--
View this message in context: http://apache-fop.1065347.n5.nabble.com/using-FOP-to-convert-RTF-to-FO-tp37464.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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


Re: using FOP to convert RTF to FO

Posted by Angelo zerr <an...@gmail.com>.
Hi Sareth,

I tell me why you must use RTF as format? Is it possible for you to use
.doc or .docx format. With this format you can benefit with docx4j or
Apache POI project.
docx4j provides utilities to merge several docx and convert it to PDF with
FOP.

Apache POI provides doc 2 PDF converter with FOP. It exists too a docx 2
PDF converter based on iText and Apache POI.

I think if you use docx format you will benefit with a lot of features
(with docx4j or Apache POI).

Regards Angelo

2012/12/7 Stefan Hinz <st...@oracle.com>

> Hi Sareth,
>
> Are you sure you want to convert the RTF to DocBook, then to FO, then to
> PDF? To me, this would make sense only if you're planning to make changes
> to the combined file later on.
>
> If this is supposed to be a one-time conversion with no future edits of
> the docs, however, I'd suggest to open all the RTF in Libre Office (or any
> other office suite), make the necessary edits in Libre Office, and export
> the RTF to PDF with the built-in converter.
>
> Cheers,
>
> Stefan
>
>
> On 06.12.2012 16:51, sareth wrote:
>
>> Hello, in fact, I would like to convert any RTF file (with embedded
>> pictures
>> for example) in FO file, then take them and merge them into one FO, then
>> rework FO to add some text for example, and print it into PDF through FOP.
>>
>> Do you know any other free way to do this please ?  I currently look at
>> iText, but nothing until now...
>>
>> thanks for your help
>>
>> regards,
>> Sareth
>>
>>
>>
>> --
>> View this message in context: http://apache-fop.1065347.n5.**
>> nabble.com/using-FOP-to-**convert-RTF-to-FO-**tp37464p37466.html<http://apache-fop.1065347.n5.nabble.com/using-FOP-to-convert-RTF-to-FO-tp37464p37466.html>
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: fop-users-unsubscribe@**xmlgraphics.apache.org<fo...@xmlgraphics.apache.org>
>> For additional commands, e-mail: fop-users-help@xmlgraphics.**apache.org<fo...@xmlgraphics.apache.org>
>>
>>
>
> --
> Cheers,
>
> Stefan Hinz <st...@oracle.com>, MySQL Documentation Manager
>
> Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc
>
> ORACLE Deutschland B.V.&  Co. KG
> Registered Office: Riesstr. 25, 80992 Muenchen, Germany
> Commercial Register: Local Court Of Munich, HRA 95603
> Managing Director: Jürgen Kunz
>
> General Partner: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697
> Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: fop-users-unsubscribe@**xmlgraphics.apache.org<fo...@xmlgraphics.apache.org>
> For additional commands, e-mail: fop-users-help@xmlgraphics.**apache.org<fo...@xmlgraphics.apache.org>
>
>

Re: using FOP to convert RTF to FO

Posted by Stefan Hinz <st...@oracle.com>.
Hi Sareth,

Are you sure you want to convert the RTF to DocBook, then to FO, then to 
PDF? To me, this would make sense only if you're planning to make 
changes to the combined file later on.

If this is supposed to be a one-time conversion with no future edits of 
the docs, however, I'd suggest to open all the RTF in Libre Office (or 
any other office suite), make the necessary edits in Libre Office, and 
export the RTF to PDF with the built-in converter.

Cheers,

Stefan

On 06.12.2012 16:51, sareth wrote:
> Hello, in fact, I would like to convert any RTF file (with embedded pictures
> for example) in FO file, then take them and merge them into one FO, then
> rework FO to add some text for example, and print it into PDF through FOP.
>
> Do you know any other free way to do this please ?  I currently look at
> iText, but nothing until now...
>
> thanks for your help
>
> regards,
> Sareth
>
>
>
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/using-FOP-to-convert-RTF-to-FO-tp37464p37466.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>


-- 
Cheers,

Stefan Hinz <st...@oracle.com>, MySQL Documentation Manager

Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc

ORACLE Deutschland B.V.&  Co. KG
Registered Office: Riesstr. 25, 80992 Muenchen, Germany
Commercial Register: Local Court Of Munich, HRA 95603
Managing Director: Jürgen Kunz

General Partner: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697
Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher

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


Re: using FOP to convert RTF to FO

Posted by Jason Harrop <jh...@gmail.com>.
Another solution would be to use LibreOffice/OpenOffice via
JODConverter to convert binary .doc or rtf to docx, and then use
docx4j or POI.

That way, you avoid the need for MS Word at run-time.

On Mon, Dec 10, 2012 at 5:15 PM, sareth <gw...@hotmail.com> wrote:
> hello everyone, thank you very much for your replies !
>
> I need produced FO file in order to modify it and to include it in another
> FO file, dynamically.
>
> I'm restricted to RTF format. You're right, I already merged some docx file
> with docx4j and it's really a very good tool.
>
> I found a solution:
> I convert RTF file in DOC with MSWord through Jacob, then I use Apache POI
> 3.9 to convert DOC to FO, by overriding picture manager method in order to
> create and extract them in a subfolder and to insert "fo:external-graphic"
> in FO resulting file.
>
> I tested it, and it worked (but pictures size have to be reworked in FO
> code)
>
> thank you again
>
> with regards,
> Sareth
>
>
>
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/using-FOP-to-convert-RTF-to-FO-tp37464p37478.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

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


Re: using FOP to convert RTF to FO

Posted by sareth <gw...@hotmail.com>.
hello everyone, thank you very much for your replies !  

I need produced FO file in order to modify it and to include it in another
FO file, dynamically.

I'm restricted to RTF format. You're right, I already merged some docx file
with docx4j and it's really a very good tool.

I found a solution:
I convert RTF file in DOC with MSWord through Jacob, then I use Apache POI
3.9 to convert DOC to FO, by overriding picture manager method in order to
create and extract them in a subfolder and to insert "fo:external-graphic"
in FO resulting file.

I tested it, and it worked (but pictures size have to be reworked in FO
code)

thank you again

with regards,
Sareth



--
View this message in context: http://apache-fop.1065347.n5.nabble.com/using-FOP-to-convert-RTF-to-FO-tp37464p37478.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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


Re: using FOP to convert RTF to FO

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi Sareth,

OpenOffice can also be automated to convert RTF unattended to PDF which can then be embedded into a FO document using FOP external graphics. If you need to make changes to the RTF you could also convert RTF to doc using OpenOffice and process the doc files. As was pointed out in a reply there are solutions using doc as a basis. There is also a download from Microsoft to convert WordprocessingML to XSL:FO. Using OpenOffice you could also convert to HTML and convert that to XSL:FO e.g. by using HTML2FO …

Kind regards

Maruan Sahyoun


Re: using FOP to convert RTF to FO

Posted by sareth <gw...@hotmail.com>.
Hello, in fact, I would like to convert any RTF file (with embedded pictures
for example) in FO file, then take them and merge them into one FO, then
rework FO to add some text for example, and print it into PDF through FOP.

Do you know any other free way to do this please ?  I currently look at
iText, but nothing until now...

thanks for your help

regards,
Sareth 



--
View this message in context: http://apache-fop.1065347.n5.nabble.com/using-FOP-to-convert-RTF-to-FO-tp37464p37466.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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


Re: using FOP to convert RTF to FO

Posted by Pascal Sancho <ps...@gmail.com>.
Hi,

FOP doesn't provide such feature, whatever the version.
Just for curiosity: what do you aim to do with resulting fo?

2012/12/6 sareth <gw...@hotmail.com>:
> hello, I currently use FOP 0.95 and I would like to know if it's possible to
> convert RTF to FO with pictures ?
>
> I found two tools that can do the job but they aren't free:
> http://www.rtf-to-xml.com/ <http://www.rtf-to-xml.com/>
> http://rtf2fo.com/index.html <http://rtf2fo.com/index.html>
>
> please can you help me ?
>
> regards,
> Sareth
>



-- 
pascal

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