Fran Burstall, thank you very much for your files. With these I have found out what the problem is. It is an upstream bug in foomatic-db-engine, the Foomatic PPD generator. The Foomatic-generated PPD file is broken and therefore an unnecessary conversion of the incoming PDF to PostScript happens which lets you run into the mentioned Ghostscript bug. I have another printer where the PPD file got generated correctly and therefore I could not reproduce the bug. With a correct PPD file the mentioned Ghostscript bug does not affect Ubuntu (at least not when using PPDs coming with Ubuntu packages).
Fran Burstall, thank you very much for your files. With these I have found out what the problem is. It is an upstream bug in foomatic-db-engine, the Foomatic PPD generator. The Foomatic-generated PPD file is broken and therefore an unnecessary conversion of the incoming PDF to PostScript happens which lets you run into the mentioned Ghostscript bug. I have another printer where the PPD file got generated correctly and therefore I could not reproduce the bug. With a correct PPD file the mentioned Ghostscript bug does not affect Ubuntu (at least not when using PPDs coming with Ubuntu packages).