A
A
alex123_4562017-08-30 10:28:39
Qt
alex123_456, 2017-08-30 10:28:39

Qt - how to save HTML to rtf format?

Hello I'm
using Qt 5.7.
I'm making a program that generates a report in the form of an HTML file, I also need to save it in rtf format.
Can you tell me how to save HTML in rtf format?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zaal, 2017-08-30
@zaal

Direct conversion is hardly possible (unless you use some external converter).
The easiest way is to generate rtf from the same initial data in parallel with the creation of an HTML file.
In order not to hardcode the layout, look towards template engines.

K
Katerina, 2017-08-30
Bumagina @eitelleren

1. Manually - using regular expressions, replace the tags in the html string with the corresponding rtf tags, remove the excess.
2. Using third party APIs like cloudconvert.com.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question