i can print using txt file printer, however, when change docx or pdf many undefined characters cannot understood @ all. guys have ideas on how solve this. the code used. import system import javax.print import java.io java.lang import thread filestream = java.io.bufferedinputstream(java.io.fileinputstream("c:/geeks.txt")) psinformat = javax.print.docflavor.input_stream.autosense mydoc = javax.print.simpledoc(filestream,psinformat,none) aset = javax.print.attribute.hashprintrequestattributeset() aset.add(javax.print.attribute.standard.copies(2)) services = javax.print.printservicelookup.lookupdefaultprintservice() job = services.createprintjob() job.print(mydoc, none) thread.sleep(20000) filestream.close() .docx files have far more formatting , nonsense going on text file. open 1 using notepad , you'll see i'm talking about. because of this, you'll need use dedicated library read docx file, such https://pypi.python.org/pypi/docx/0.2.4 ...
i writing qtquick desktop application. use both c++ (for functionality) , qml (for ui) in it. use qquickview show interface written in qml. i want application reside in system tray when minimised. i mean functionality similar example. http://qt-project.org/doc/qt-4.8/desktop-systray.html . trying implement feature not find way in qt quick application. here main.cpp code: #include <qguiapplication> #include <qqmlengine> #include <qqmlcontext> #include <qqmlfileselector> #include <qquickview> #include "myapp.h" int main(int argc, char* argv[]) { qguiapplication app(argc,argv); app.setapplicationname(qfileinfo(app.applicationfilepath()).basename()); qdir::setcurrent(qapp->applicationdirpath()); myapp myappobject; qquickview view; view.connect(view.engine(), signal(quit()), &app, slot(quit())); view.rootcontext()->setcontextproperty("myappobject", &myappobject); new qqmlfilese...
i have encountered problem in mssql & delphi xe3. text , varchar(max) fields seemed (memo) or (widememo) in tdbgrid & tdbadvgrid (tms dbgrid). in first screenshot can see table fiels, in second screentshot can see sample data in database: in screenshot, see how in dbgrid or in query results. i figured out changing field type char , varchar not max solves issue don't know why having problem. can please let me know?
Comments
Post a Comment