Hi all
I am working on a project where we need to produce documents (in a platform independent way) from data held withing the application.
Does anyone have any recomendations on how this can be achieved?
TIA
Graham
Hi all
I am working on a project where we need to produce documents (in a platform independent way) from data held withing the application.
Does anyone have any recomendations on how this can be achieved?
TIA
Graham
Hi - thanks for replying
Forgive my ignorance, I am completely new to QT.
I am currently redesigning/rewriting an exiting MS application to use QT so we can take advantage of platform and language independence that QT offers.
Currently the application produces a simplistic plain text document, but our customers want a professional looking document- currently they use our data to produce a MS Word document.
How easy is it to produce a PDF document? (how does one do it)?
Is there an advantage to using something like ODF? (would our customers be able to read the document)
TIA
Graham
Well it depends what your customer want to do with the document. If don't want to change it, I would go for pdf, since then it is guaranteed, that it look everywhere the same and you can store the document a long time. If you want to change values then of course go for odf. But it sounds like your costumer only wants something to print out.
For pdf there are some examples, but effectively it is nothing else than painting (using QPainter) on a defined piece of paper where you have to positioning the elements. One nice thing is that you can also use a QTextDocument for more advanced text documents and print it directly using QTextDocument::print().
GrahamLabdon (23rd April 2010)
I don't know if you have found that: http://doc.trolltech.com/qq/qq27-odfwriter.html. It's an good article for starting. Even if it is for odt.
A good idea is to render the document into html and then print it to pdf from WebKit using means already mentioned by Lykurg.
Thanks everyone
Hi everyone
I used the code from the QT Quarterly suggested by Lykurg to produce a odt document.
However when I try to open with MS Word it refuses as it says that the file couild not be opened - 'the open office XML .. file could not be opened' the details tab gives 'the file is corrupt and could not be opened'
Any ideas?
Graham
Hi wysota
What filter do I need?
Ask google for "word odf"... E.g. http://sourceforge.net/projects/odf-converter/
Thanks Lykurg
I have downloaded the odf-converter and can now open the generated odt file, however, the formating is all lost and does not look like the example given
any more ideas?
Graham
Do you require the document to be editable in Word or is it just something you would like to have?
The document should be editable in word and preferably on MAC and *nix
Bookmarks