October 15, 2010

wmesquita wmesquita
Lab Rat
1 posts

Problems in printing with networked printer -  setting paper size or orientation brakes the printing process

 

Hi All,

I am having some trouble in printing with QT API.

The problems hapens in Windows, with QT 4.5.3 commercial version compiled with Visual Studio 2005.

I have lexmark T664 printer connected to a printer server running windows (I donĀ“t have access to this server, but the network admin just said to me that it is windows, to eliminate eventual CUPS related problems).

In the following scenarios, the printing process works fine:

- Made a local installation of the printer.

- Mapping the printer by the IP

- Using a virtual printer like PDFCreator (tested as local, server and IP mapped).

So the only situation it fails is on the lexmark printer via server.

My main observations:

- Using any of the functions: setPaperSize, setPageSize or setOrientation, the call QPainter::begin(QPrinter) returns false.

- Creating a QPrinterInfo based on this QPrinter object, the avaiablePaperSizes list is empty.

- Using a QPrintDialog to setup de QPrinter object, everything works fine. But our application has a requisit to be only command line.

I tried some hacking at QT internals and looked for related reported bugs, but they did not help. My last try was to compile a brand new version of the open version. Without success.

So, my main guess is that there is something wrong with the printer handle when there is server intermediating the process.

Well, any help will be very appreciated.

Wesley

0 replies

 
  ‹‹ Edit Windows Registry      QAbstractItemModel/QTreeView ››

You must log in to post a reply. Not a member yet? Register here!