Opened 15 years ago

Closed 14 years ago

#141 closed enhancement (fixed)

CUPS: get cups.dll and use PDF output by default

Reported by: Dmitry A. Kuminov Owned by:
Priority: major Milestone: Qt 4.6.3
Component: QtGui Version: 4.5.1 GA
Severity: low Keywords:
Cc: psmedley

Description

This is partly a continuation of #36. Linking to cups.dll instead of libcups.a will allow for transparent CUPS updates w/o rebuilding Qt. The PDF output simply doesn't work for some reason (confirmed by Paul).

Change History (12)

comment:1 by psmedley, 15 years ago

Cc: psmedley added

cups.dll can be created with dllar -o cups.dll libcups.a -lpthread

PDF output sometimes works here... need to try and reproduce the failure with debug logging enabled

comment:2 by Dmitry A. Kuminov, 15 years ago

Well, it's clear how to make the DLL but what I actually mean is that cups.dll should first become part of the official eCUPS distribution. Making a private copy of cups.dll and distributing it with the Qt Runtime makes no difference comparing to linking to it statically.

So once eCUPS.WPI/ZIP provides cups.dll I will change Qt to link to it instead of libcups.a.

comment:3 by Dmitry A. Kuminov, 15 years ago

Type: defectenhancement

comment:4 by Silvan Scherrer, 14 years ago

with a new pdftops from cups the pdf output works now.

comment:5 by Dmitry A. Kuminov, 14 years ago

Good to hear.

comment:6 by Dmitry A. Kuminov, 14 years ago

Ah, sending PDF to CUPS is disabled now (see qprinter.cpp in r573). We should check if it really works from Qt now and enable it if so (we may check the CUPS version to make sure it will work with the old unfixed CUPS).

comment:7 by Dmitry A. Kuminov, 14 years ago

Milestone: Qt EnhancedQt 4.6.3

comment:8 by Silvan Scherrer, 14 years ago

line 827 in qprinter.cpp needs to be changed to:

#if (defined(Q_OS_UNIX)
defined(Q_WS_PM)) && !defined(QT_NO_CUPS)

after that pdf is working

comment:9 by Silvan Scherrer, 14 years ago

our cups version 1.4.4 and above will have the pdftops fixed. so we could add a version check.

pdfs produced by Qt are broken right now. Dmik is investigating it.
only the pdf's sent direct to cups have that problem, not the on's written to a file.

comment:10 by Silvan Scherrer, 14 years ago

ok the cause is found. it's cups who produces a wrong file
in CupsTempFD() the O_BINARY mode is not set. talking to Paul about it.

comment:11 by Dmitry A. Kuminov, 14 years ago

In r781, I force the file mode to O_BINARY in QPdf now (just in case if it ever breaks again or if Paul is not able to fix it for some reason).

Also, in r782, I added a version check to enable the PDF engine for CUPS printing by default. Silvan, please check that the SVN version works for you now.

comment:12 by Dmitry A. Kuminov, 14 years ago

Resolution: fixed
Status: newclosed

As Silvan reports, everything works as expected now.

As for the DLL issue, I no longer think that we should care a lot about this: making libcups.a a DLL won't actually remove API dependency but will only reduce the footprint of the QtGui DLL. Anyway, we will link Qt with cups.dll (as part of the normal 3rdparty software update process) once it gets available in eCUPS.

Note: See TracTickets for help on using tickets.