Hi guys,
I would like to send to printer a doc file, or any other binary file using Qt4,
but i'm not ablet to get to a solution.
Is there an easy way to do that ?
Thank you very mutch in advance..
Roby
Hi guys,
I would like to send to printer a doc file, or any other binary file using Qt4,
but i'm not ablet to get to a solution.
Is there an easy way to do that ?
Thank you very mutch in advance..
Roby
read source from:
http://www.qt-apps.org/content/show....?content=62383
is a easy example inside ....
I do not understand which is the part in that example code that should lead me to the solution for the problem I posted..
I mean some of you knows the two or three lines of code to send to the default printer,
a file which is in the file system?
Thanks to all
Hi all,
ABout this tematic, I would like to know if there is the possibilitiy to treat binary document the same way as text document..
we, indeed know, that for txt file it is possible to write somethink like:
Qt Code:
QPrinter printer; return; document->print(&printer);To copy to clipboard, switch view to plain text mode
is there some possibility to do the same for binary files (doc, pdf, etc..) ?
Thank you very mutch for you kind reply.
Roby
any help ?
Thx
Guys
The problem I posted I found was discussed in the past bu even at that time there was not solution..
This mean it is not possibile to do that using Qt ????
Please let me know
no one have idea?
Hi everybody..Any of you could help with the question posted ?
Thank you
Qt doesn't handle such things. If you want things that platform dependent, use platform dependent API. Just be aware there is no magic call that would be able to print any file format. For example for printing postscript or pdf files on KDE you can simply call "kprinter /path/to/file", but you won't be able to print MS Word documents like that, in that case you have to open the document in an appropriate application (like Word itself or Open Office) and call the application's print method manually (or using ActiveX on Windows).
You can use QDesktopServices to open a document in an appropriate application, but this won't get it printed automatically (the application might not even support printing at all).
rmagro (1st September 2008)
it means I can't use Qt Api to print a .odt file as well ?
Thx
As for Qt 4.4 that's correct. As far as I know Qt 4.5 will be able to handle the Open Document Format.
rmagro (2nd September 2008)
If you want to print OpenDocument formats (only .odt, not .doc) via your application you can use KOffice's source codes. But this needs to done by a huge hacking of sources.
Also for printing .doc files, you can use extra libraries like doc2pdf or doc2html (won't be stable because of Qt's Html Renderer) to print.
You know KOffice source? I read on a wiki kword that the porting from last testing is already QT4 compatible.... is this true?
I use XSLT to convert OpenFormat odt or old swx to QTextDocument on my application http://www.qt-apps.org/content/show....?content=67552 and this App can handle BookMark pdf (QTreeItem Model) .
But i am not happy to use QTextDocument if i draw 50 page i can take 1-2 coffe in this time by render all text . I can only write 5-6 page to QTextDocument to stay on acceptable time.
I Install the new KDE 4.1 on my debian and i try his Kword its run ok .. and i find a bug ....
what is place to submit Kword bug?
Kword: If i copy text from one page and i continue to paste 20 time on page it crash.
How i can begin to extract a virtual ..
ScribeDocument a TextCursor and a AbstractDocLayout from Kword to draw text?
Have you any idea?
My target is to handle XSL-FO document which having many option to buil document or book if XSL-FO having pdf form generator it having the same option as Latex/tex.
KOffice2 is built using Qt4
I think it's at: https://bugs.kde.org/
The other questions on you message I don't know. I'm not very familiar with KOffice/KWord code. Hopefully someone else in this forum can help you out.
You think after is possibel to read & write Open Document Format?
I grab the snapshots qt4.5 from today i find only
init QTextDocumentWriter
-> QTextOdfWriter
-> QZipWriter
> QZipReader
> OdfReader (fail not exist at this time)
Ok QtextDocument and all child having a lot of change to style Open Document Format
i can see difference on page
http://code.google.com/p/fop-miniscr...e/detail?r=356
i load first qt4.4 src/gui/text at end qt4.5
I ask you its possibel to comming soon a Reader Open Document Format?
I find only http://labs.trolltech.com/blogs/2008...cument-format/
I asked that on the comments on the blog post you linked. Thiago Macieira (employee of Trolltech) responded saying that Qt 4.5 will only have a way to write ODF, not read. Makes zero sense to me (having a writer and not a reader), but it's their call. Maybe by looking at the code from QTextDocumentWriter one should be able to create a QTextDocumentReader.
Bookmarks