Bug 262757 - print/cups-pdf: blank pdf on printing to pdf
Summary: print/cups-pdf: blank pdf on printing to pdf
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-24 11:18 UTC by freebsd-bugs
Modified: 2022-04-01 13:02 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd-bugs 2022-03-24 11:18:30 UTC
Prints blank pdf files.

Caused by ghostscript using depreciated setpdfwrite operator.

It's been solved by other talented people elsewhere - See https://github.com/archlinux/svntogit-packages/blob/packages/cups-pdf/trunk/remove-deprecated-ghostscript-setpdfwrite-operator.diff

Until patched, edit GSCall in /usr/local/etc/cups/cups-pdf.conf so that the "-c .setpdfwrite" argument is only "-c"
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2022-04-01 12:00:06 UTC
How do you trigger the issue?
Comment 2 freebsd-bugs 2022-04-01 12:23:22 UTC
By printing to PDF using a Virtual PDF Printer.

If relevant, I had these variants of ghostscript installed,

- ghostscript9-agpl-base
- ghostscript9-agpl-x11

As soon as I changed cups-pdf.conf as per my first comment, it resolved.
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2022-04-01 12:33:26 UTC
Do you know if it's a problem with all versions of ghostscript or limited to ghostscript9?
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2022-04-01 12:54:17 UTC
(In reply to Mikael Urankar from comment #3)
n/m, this port requires gh9
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-04-01 12:59:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1ca92b55c1bfa84fd8a2d2b52767a4979d6f17e5

commit 1ca92b55c1bfa84fd8a2d2b52767a4979d6f17e5
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2022-04-01 12:46:43 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-04-01 12:59:06 +0000

    print/cups-pdf: Remove deprecated ghostscript setpdfwrite operator

    cups-pdf prints a blank patch without this patch.

    PR:             262757
    Reported by:    freebsd-bugs@micallef.io
    Obtained from:  archlinux (https://bugs.archlinux.org/task/70313)

 print/cups-pdf/Makefile                            |  2 +-
 ...precated-ghostscript-setpdfwrite-operator (new) | 27 ++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2022-04-01 13:02:29 UTC
Thanks!