PDF - lpadmin

Helge Blischke h.blischke at acm.org
Tue Jul 12 12:31:46 PDT 2011


Seema wrote:

> Installed - cups, poppler and ghostscript from timesys, working on arm
> processor.
> 
> I want to create pdf files from QT Application.
> I am using simple program
>     QPainter painter;
>     QString file = "/home/test/test.pdf";
>     printer.setOutputFormat(QPrinter::PDFFormat);
>     printer.setOutputFileName(file);
>     if(painter.begin(&printer))
>     {
>         QPoint point;
>         point.setX(10);
>         point.setY(10);
>         QString text = "testing";
>         painter.drawText(point, text);
>         painter.end();
> 
>     }
> 
> Used lpadmin to add printer
> lpadmin -p "ghostpdf" -v "ipp://localhost:631/home/test" -D "ghostpdf" -E
> -P "/usr/share/cups/model/ghostpdf.ppd"
> 
> I have no physical printer attached. What is wrong here?
> 
> Here is the output of my error_log
> 
> I [12/Jul/2011:10:58:30 +0000] Listening to ::1:631 (IPv6)
> I [12/Jul/2011:10:58:30 +0000] Listening to 127.0.0.1:631 (IPv4)
> I [12/Jul/2011:10:58:30 +0000] Listening to /var/run/cups/cups.sock
> (Domain) I [12/Jul/2011:10:58:30 +0000] Remote access is disabled.
> I [12/Jul/2011:10:58:30 +0000] Loaded configuration file
> "/etc/cups/cupsd.conf" D [12/Jul/2011:10:58:30 +0000] Repairing ownership
> of "/var/cache/cups" D [12/Jul/2011:10:58:30 +0000] Repairing access
> permissions of "/var/cache/cups" D [12/Jul/2011:10:58:30 +0000] Repairing
> ownership of "/var/cache/cups/rss" D [12/Jul/2011:10:58:30 +0000]
> Repairing access permissions of "/var/cache/cups/rss" D
> [12/Jul/2011:10:58:30 +0000] Repairing ownership of "/var/run/cups" D
> [12/Jul/2011:10:58:30 +0000] Repairing access permissions of
> "/var/run/cups" D [12/Jul/2011:10:58:30 +0000] Creating missing directory
> "/var/run/cups/certs" D [12/Jul/2011:10:58:30 +0000] Repairing ownership
> of "/var/run/cups/certs" D [12/Jul/2011:10:58:30 +0000] Repairing access
> permissions of "/var/run/cups/certs" I [12/Jul/2011:10:58:30 +0000] Using
> default TempDir of /home/test/tmp... I [12/Jul/2011:10:58:30 +0000]
> Configured for up to 100 clients. I [12/Jul/2011:10:58:30 +0000] Allowing
> up to 100 client connections per host. I [12/Jul/2011:10:58:30 +0000]
> Using policy "default" as the default! I [12/Jul/2011:10:58:30 +0000] Full
> reload is required. I [12/Jul/2011:10:58:30 +0000] Loaded MIME database
> from "/usr/share/cups/mime" and "/etc/c. D [12/Jul/2011:10:58:30 +0000]
> Loading printer ghostpdf... D [12/Jul/2011:10:58:30 +0000]
> cupsdMarkDirty(P-----) D [12/Jul/2011:10:58:30 +0000] cupsdSetBusyState:
> Dirty files D [12/Jul/2011:10:58:30 +0000] load_ppd: Loading
> /etc/cups/ppd/ghostpdf.ppd... D [12/Jul/2011:10:58:30 +0000] load_ppd:
> Saving /var/cache/cups/ghostpdf.ipp... D [12/Jul/2011:10:58:30 +0000]
> cupsdMarkDirty(P-----) E [12/Jul/2011:10:58:30 +0000] Filter
> "/usr/lib/cups/filter/commandtops" for printer "ghost) D
> [12/Jul/2011:10:58:30 +0000] cupsdRegisterPrinter(p=0x2a06c020(ghostpdf))
> D [12/Jul/2011:10:58:30 +0000] Scanning /home/storage/Reports for jobs...
> I [12/Jul/2011:10:58:30 +0000] Full reload complete. I
> [12/Jul/2011:10:58:30 +0000] Cleaning out old temporary files in
> "/home/storage/Reports/t. E [12/Jul/2011:10:58:30 +0000] Unable to open
> listen socket for address ::1:631 - Address f. I [12/Jul/2011:10:58:30
> +0000] Listening to 127.0.0.1:631 on fd 4... I [12/Jul/2011:10:58:30
> +0000] Listening to /var/run/cups/cups.sock on fd 6... I
> [12/Jul/2011:10:58:30 +0000] Resuming new connection processing... D
> [12/Jul/2011:10:58:30 +0000] cupsdRegisterPrinter(p=0x2a06c020(ghostpdf))
> D [12/Jul/2011:10:58:30 +0000] Discarding unused server-started event... D
> [12/Jul/2011:10:58:31 +0000] Report: clients=0 D [12/Jul/2011:10:58:31
> +0000] Report: jobs=0 D [12/Jul/2011:10:58:31 +0000] Report: jobs-active=0
> D [12/Jul/2011:10:58:31 +0000] Report: printers=1 D [12/Jul/2011:10:58:31
> +0000] Report: printers-implicit=0 D [12/Jul/2011:10:58:31 +0000] Report:
> stringpool-string-count=290 D [12/Jul/2011:10:58:31 +0000] Report:
> stringpool-alloc-bytes=7320 D [12/Jul/2011:10:58:31 +0000] Report:
> stringpool-total-bytes=6760 I [12/Jul/2011:10:59:01 +0000] Saving
> printers.conf... D [12/Jul/2011:10:59:01 +0000] cupsdSetBusyState: Not
> busy D [12/Jul/2011:11:01:06 +0000] cupsdAcceptClient: 10 from localhost
> (Domain) D [12/Jul/2011:11:01:06 +0000] Report: clients=1 D
> [12/Jul/2011:11:01:06 +0000] Report: jobs=0 D [12/Jul/2011:11:01:06 +0000]
> Report: jobs-active=0 D [12/Jul/2011:11:01:06 +0000] Report: printers=1
> D [12/Jul/2011:11:01:06 +0000] Report: printers-implicit=0
> D [12/Jul/2011:11:01:06 +0000] Report: stringpool-string-count=290
> D [12/Jul/2011:11:01:06 +0000] Report: stringpool-alloc-bytes=7320
> D [12/Jul/2011:11:01:06 +0000] Report: stringpool-total-bytes=6760
> D [12/Jul/2011:11:01:06 +0000] cupsdReadClient: 10 POST / HTTP/1.1
> D [12/Jul/2011:11:01:06 +0000] cupsdSetBusyState: Active clients
> D [12/Jul/2011:11:01:06 +0000] cupsdAuthorize: No authentication data
> provided. D [12/Jul/2011:11:01:06 +0000] cupsdReadClient: 10 1.1
> CUPS-Get-Printers 1 D [12/Jul/2011:11:01:06 +0000] CUPS-Get-Printers
> D [12/Jul/2011:11:01:06 +0000] Returning IPP successful-ok for
> CUPS-Get-Printers (no URI) ft D [12/Jul/2011:11:01:06 +0000]
> cupsdSetBusyState: Not busy D [12/Jul/2011:11:01:06 +0000]
> cupsdReadClient: 10 POST / HTTP/1.1 D [12/Jul/2011:11:01:06 +0000]
> cupsdSetBusyState: Active clients D [12/Jul/2011:11:01:06 +0000]
> cupsdAuthorize: No authentication data provided. D [12/Jul/2011:11:01:06
> +0000] cupsdReadClient: 10 1.1 CUPS-Get-Default 1 D [12/Jul/2011:11:01:06
> +0000] CUPS-Get-Default D [12/Jul/2011:11:01:06 +0000] Returning IPP
> successful-ok for CUPS-Get-Default (no URI) frt D [12/Jul/2011:11:01:06
> +0000] cupsdSetBusyState: Not busy D [12/Jul/2011:11:01:07 +0000]
> cupsdReadClient: 10 WAITING Closing on EOF D [12/Jul/2011:11:01:07 +0000]
> cupsdCloseClient: 10 D [12/Jul/2011:11:03:33 +0000] cupsdAcceptClient: 10
> from localhost (Domain) D [12/Jul/2011:11:03:33 +0000] Report: clients=1
> D [12/Jul/2011:11:03:33 +0000] Report: jobs=0
> D [12/Jul/2011:11:03:33 +0000] Report: jobs-active=0
> D [12/Jul/2011:11:03:33 +0000] Report: printers=1
> D [12/Jul/2011:11:03:33 +0000] Report: printers-implicit=0
> D [12/Jul/2011:11:03:33 +0000] Report: stringpool-string-count=290
> D [12/Jul/2011:11:03:33 +0000] Report: stringpool-alloc-bytes=7320
> D [12/Jul/2011:11:03:33 +0000] Report: stringpool-total-bytes=6760
> D [12/Jul/2011:11:03:33 +0000] cupsdReadClient: 10 POST / HTTP/1.1
> D [12/Jul/2011:11:03:33 +0000] cupsdSetBusyState: Active clients
> D [12/Jul/2011:11:03:33 +0000] cupsdAuthorize: No authentication data
> provided. D [12/Jul/2011:11:03:33 +0000] cupsdReadClient: 10 1.1
> CUPS-Get-Printers 1 D [12/Jul/2011:11:03:33 +0000] CUPS-Get-Printers
> D [12/Jul/2011:11:03:33 +0000] Returning IPP successful-ok for
> CUPS-Get-Printers (no URI) ft D [12/Jul/2011:11:03:33 +0000]
> cupsdSetBusyState: Not busy D [12/Jul/2011:11:03:33 +0000]
> cupsdReadClient: 10 POST / HTTP/1.1 D [12/Jul/2011:11:03:33 +0000]
> cupsdSetBusyState: Active clients D [12/Jul/2011:11:03:33 +0000]
> cupsdAuthorize: No authentication data provided. D [12/Jul/2011:11:03:33
> +0000] cupsdReadClient: 10 1.1 CUPS-Get-Default 1 D [12/Jul/2011:11:03:33
> +0000] CUPS-Get-Default D [12/Jul/2011:11:03:33 +0000] Returning IPP
> successful-ok for CUPS-Get-Default (no URI) frt D [12/Jul/2011:11:03:33
> +0000] cupsdSetBusyState: Not busy D [12/Jul/2011:11:03:34 +0000]
> cupsdReadClient: 10 WAITING Closing on EOF D [12/Jul/2011:11:03:34 +0000]
> cupsdCloseClient: 10 D [12/Jul/2011:11:04:32 +0000] cupsdAcceptClient: 10
> from localhost (Domain) D [12/Jul/2011:11:04:32 +0000] cupsdReadClient: 10
> POST / HTTP/1.1 D [12/Jul/2011:11:04:32 +0000] cupsdSetBusyState: Active
> clients D [12/Jul/2011:11:04:32 +0000] cupsdAuthorize: No authentication
> data provided. D [12/Jul/2011:11:04:32 +0000] cupsdReadClient: 10 1.1
> Get-Jobs 1 D [12/Jul/2011:11:04:32 +0000] Get-Jobs ipp://localhost/
> D [12/Jul/2011:11:04:32 +0000] Returning IPP successful-ok for Get-Jobs
> (ipp://localhost/) t D [12/Jul/2011:11:04:32 +0000] cupsdSetBusyState: Not
> busy D [12/Jul/2011:11:04:32 +0000] cupsdReadClient: 10 WAITING Closing on
> EOF D [12/Jul/2011:11:04:32 +0000] cupsdCloseClient: 10
> D [12/Jul/2011:11:04:33 +0000] Report: clients=0
> D [12/Jul/2011:11:04:33 +0000] Report: jobs=0
> D [12/Jul/2011:11:04:33 +0000] Report: jobs-active=0
> D [12/Jul/2011:11:04:33 +0000] Report: printers=1
> D [12/Jul/2011:11:04:33 +0000] Report: printers-implicit=0
> D [12/Jul/2011:11:04:33 +0000] Report: stringpool-string-count=290
> D [12/Jul/2011:11:04:33 +0000] Report: stringpool-alloc-bytes=7320
> D [12/Jul/2011:11:04:33 +0000] Report: stringpool-total-bytes=6760
> D [12/Jul/2011:11:04:35 +0000] cupsdAcceptClient: 10 from localhost
> (Domain) D [12/Jul/2011:11:04:35 +0000] cupsdReadClient: 10 POST /
> HTTP/1.1 D [12/Jul/2011:11:04:35 +0000] cupsdSetBusyState: Active clients
> D [12/Jul/2011:11:04:35 +0000] cupsdAu

I guess you want to "print" into PDF files. So you need a backend that 
generates PDF from PostScript and writes it to a (preferably user 
selectable) file.
Such backends are not part of standard CUPS, but there are a lot of open 
source backends for this purpose around in the internet.

Helge





More information about the cups mailing list