Opened 10 years ago

Closed 9 years ago

#141 closed enhancement (fixed)

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

Reported by: dmik Owned by:
Priority: major Milestone: Qt 4.6.3
Component: QtGui Version: 4.5.1 GA
Severity: low Keywords:
Cc: psmedley


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 Changed 10 years ago by psmedley

  • 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 Changed 10 years ago by dmik

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 Changed 10 years ago by dmik

  • Type changed from defect to enhancement

comment:4 Changed 9 years ago by diver

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

comment:5 Changed 9 years ago by dmik

Good to hear.

comment:6 Changed 9 years ago by dmik

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 Changed 9 years ago by dmik

  • Milestone changed from Qt Enhanced to Qt 4.6.3

comment:8 Changed 9 years ago by diver

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 Changed 9 years ago by diver

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 Changed 9 years ago by diver

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 Changed 9 years ago by dmik

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 Changed 9 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

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.