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

Henrik Morsing henrik at morsing.cc
Thu May 2 05:55:42 PDT 2019


On Thu, May 02, 2019 at 01:13:56PM +0200, Helge Blischke wrote:
>
[...]
>or even if the two character sequence
>!%
>is found at the very beginning of a text line within the first 4096 bytes of the file.
>
>Because of this, the file is treated as a PostScript file.
>OTOH, the filter gstopdf (from the cups-pdf package) itself checks if the input file
>is either a PDF or a PostScript file depending on the first 4 or 2 characters
>reading
>%PDF
>or
>!%
>
>If that is not the case, it outputs the error message „can\’t detect file type“.
>
>Could you please post the first 4096 bytes of a sample file that exhibits this issue?
>

Hi,

It look like it's a PJL encapsulated PS file:

# head -6 d00285-001
2345X at PJL JOB
@PJL SET FRONTCOVERPRINT=OFF
@PJL SET FRONTCOVERPRINTTRAY=TRAY1
@PJL SET ECONOMODE=OFF
@PJL ENTER LANGUAGE=POSTSCRIPT
%!PS-Adobe-3.0

Thanks
Henrik


More information about the cups mailing list