[cups] Can't detect file type / Not a PDF file

Henrik Morsing henrik at morsing.cc
Wed May 1 23:25:18 PDT 2019


Hi,

On Wed, May 01, 2019 at 10:29:34AM +0100, Brian Potkin wrote:
>
>The text file is processed by the server correctly. All the filters
>start and complete successfully. Send the same the same file from a
>client (and other file types, if you wish) and look at the error_log
>on the server. CUPS types the received file (Auto type?} near the
>beginning of the log, just before it determines the filters required.
>

I tried a text file from a client, and can see this:

D [02/May/2019:07:13:45 +0100] [Job ???] Auto-typing file...
I [02/May/2019:07:13:45 +0100] [Job ???] Request file type is application/postscript.

and 

D [02/May/2019:07:13:45 +0100] [Job 278] 4 filters for job:
D [02/May/2019:07:13:45 +0100] [Job 278] gstopdf (application/postscript to application/pdf, cost 0)
D [02/May/2019:07:13:45 +0100] [Job 278] pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
D [02/May/2019:07:13:45 +0100] [Job 278] gstoraster (application/vnd.cups-pdf to application/vnd.cups-raster, cost 99)
D [02/May/2019:07:13:45 +0100] [Job 278] rastertogutenprint.5.2 (application/vnd.cups-raster to printer/Ricoh, cost 100)
D [02/May/2019:07:13:45 +0100] [Job 278] job-sheets=none,none

and

D [02/May/2019:07:13:45 +0100] [Job 278] envp[29]="FINAL_CONTENT_TYPE=application/vnd.cups-raster"
D [02/May/2019:07:13:45 +0100] [Job 278] envp[30]="AUTH_I****"
I [02/May/2019:07:13:45 +0100] [Job 278] Started filter /usr/lib/cups/filter/gstopdf (PID 8990)
I [02/May/2019:07:13:45 +0100] [Job 278] Started filter /usr/lib/cups/filter/pdftopdf (PID 8991)
I [02/May/2019:07:13:45 +0100] [Job 278] Started filter /usr/lib/cups/filter/gstoraster (PID 8992)
I [02/May/2019:07:13:45 +0100] [Job 278] Started filter /usr/lib/cups/filter/rastertogutenprint.5.2 (PID 8993)
I [02/May/2019:07:13:45 +0100] [Job 278] Started backend /usr/lib/cups/backend/http (PID 8994)

But then this:

D [02/May/2019:07:13:45 +0100] [Job 278] gstopdf argv[6] = 278 morsing New Text Document (2) - Notepad 1 job-uuid=urn:uuid:9ad35680-8a5a-312d-7297-e651ebbecda0 job-originating-host-name=192.168.1.136 date-time-at-creation= date-time-at-processing= time-at-creation=1556777625 time-at-processing=1556777625 /var/spool/cups/d00278-001
D [02/May/2019:07:13:45 +0100] [Job 278] PPD: /etc/cups/ppd/Ricoh.ppd
D [02/May/2019:07:13:46 +0100] [Notifier] state=3
I [02/May/2019:07:13:46 +0100] Expiring subscriptions...
D [02/May/2019:07:13:46 +0100] [Notifier] Connected to D-BUS
D [02/May/2019:07:13:46 +0100] [Job 278] Sending stdin for job...
D [02/May/2019:07:13:46 +0100] [Job 278] update_reasons(attr=0(), s=\"+connecting-to-device\")
D [02/May/2019:07:13:46 +0100] [Job 278] STATE: +connecting-to-device
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(---J-)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Printing jobs and dirty files"
D [02/May/2019:07:13:46 +0100] [Job 278] Looking up \"172.16.1.243\"...
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(----S)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [02/May/2019:07:13:46 +0100] [Job 278] pdftopdf: Last filter determined by the PPD: rastertogutenprint.5.2; FINAL_CONTENT_TYPE: application/vnd.cups-raster => pdftopdf will not log pages in page_log.
D [02/May/2019:07:13:46 +0100] [Job 278] OUTFORMAT=\"PDF\", so output format will be PDF
D [02/May/2019:07:13:46 +0100] [Job 278] OUTFORMAT=\"(null)\", so output format will be CUPS/PWG Raster
D [02/May/2019:07:13:46 +0100] [Notifier] JobCreated
D [02/May/2019:07:13:46 +0100] [Notifier] state=3
D [02/May/2019:07:13:46 +0100] [Notifier] PrinterStateChanged
D [02/May/2019:07:13:46 +0100] [Notifier] state=3
D [02/May/2019:07:13:46 +0100] [Notifier] JobState
E [02/May/2019:07:13:46 +0100] [Job 278] Can\'t detect file type
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(---J-)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [02/May/2019:07:13:46 +0100] [Job 278] Set job-printer-state-message to "Can\'t detect file type", current level=ERROR
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(----S)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(----S)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [02/May/2019:07:13:46 +0100] [Notifier] state=3
D [02/May/2019:07:13:46 +0100] [Notifier] PrinterStateChanged
D [02/May/2019:07:13:46 +0100] [Notifier] state=3
D [02/May/2019:07:13:46 +0100] [Notifier] JobProgress
D [02/May/2019:07:13:46 +0100] [Notifier] state=3
D [02/May/2019:07:13:46 +0100] [Notifier] PrinterStateChanged
D [02/May/2019:07:13:46 +0100] [Job 278] PID 8990 (/usr/lib/cups/filter/gstopdf) stopped with status 1.
E [02/May/2019:07:13:46 +0100] [Job 278] loadFile failed: temp file: not a PDF file
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(----S)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(----S)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [02/May/2019:07:13:46 +0100] [Notifier] state=3
D [02/May/2019:07:13:46 +0100] [Notifier] JobProgress
D [02/May/2019:07:13:46 +0100] [Notifier] state=3
D [02/May/2019:07:13:46 +0100] [Notifier] PrinterStateChanged
E [02/May/2019:07:13:46 +0100] [Job 278] Can\'t detect file type
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(----S)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [02/May/2019:07:13:46 +0100] cupsdMarkDirty(----S)
D [02/May/2019:07:13:46 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [02/May/2019:07:13:46 +0100] [Job 278] PID 8991 (/usr/lib/cups/filter/pdftopdf) stopped with status 1.
D [02/May/2019:07:13:46 +0100] [Job 278] PID 8992 (/usr/lib/cups/filter/gstoraster) stopped with status 1.


Without any prior errors that I can see, it says "Can't detect file type" and everything starts failing after that.

It looks like gstopdf runs, but when pdftopdf runs (why's this needed) it's not actually handed a PDF file?

And what does this mean:

D [02/May/2019:07:13:46 +0100] [Job 278] pdftopdf: Last filter determined by the PPD: rastertogutenprint.5.2; FINAL_CONTENT_TYPE: application/vnd.cups-raster => pdftopdf will not log pages in page_log.

Thanks
Henrik


More information about the cups mailing list