Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF print does not work on Linux WSL2 #6246

Open
SmartProgDeveloper opened this issue Jan 21, 2025 · 0 comments
Open

PDF print does not work on Linux WSL2 #6246

SmartProgDeveloper opened this issue Jan 21, 2025 · 0 comments

Comments

@SmartProgDeveloper
Copy link

For Linux Debian, installed as Windows Subsystem for Linux (WSL2), the physical print of any PDF file is completely impossible. Physical machine runs Windows 11. WSL2 machine data:

Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

Cups version is 2.3.3. Many different ways were tried to print pdf files. Print works successfully for all files, except of PDF. For PDF, print job is successfully sent, but physical print is never done.

Attempts to print PDF with CUPS were done from terminal with different options:

  1. lp -d SHARP_BP-50C26_PCL6_BROWSER test_output.pdf
  2. lp -d SHARP_BP-50C26_PCL6 -o media=A4 -o sides=one-sided -o media=iso_a4_210x297mm -n 1 test_output.pdf

I provide full CUPS log for command number 1, which does not show any error:

I [21/Jan/2025:11:39:23 +0100] [Job 43] Adding start banner page "none".
I [21/Jan/2025:11:39:23 +0100] [Job 43] Queued on "SHARP_BP-50C26_PCL6" by "root".
I [21/Jan/2025:11:39:23 +0100] [Job 43] File of type application/pdf queued by "root".
I [21/Jan/2025:11:39:23 +0100] [Job 43] Adding end banner page "none".
I [21/Jan/2025:11:39:23 +0100] [Job 43] Started backend /usr/lib/cups/backend/socket (PID 1447)
I [21/Jan/2025:11:39:23 +0100] [Job 43] Job completed.

File test_output.pdf is plain text file, which contains only one line of text. And it is never printed.

Code in C, utilising CUPS functions cupsCreateDestJob, cupsStartDestDocument, cupsWriteRequestData, cupsFinishDestDocument was also wrote and tested. It successfully sends print job, however PDF file is never printed physically.

Printer is SHARP-BP-50C26. On Windows it prints PDF perfectly fine.
I tried to add printer from Linux terminal, and then re-add from browser.

In general a lot of ways to print PDF on physical printer were done, respecting official CUPS manual. One could suggest that SHARP printer is not supported on Linux, but this printer works perfectly fine on Linux WSL2 for plain text and for *.png images. So, using Linux is not an issue. Physical print (on paper) fails for PDF only. Logs at /var/log/cups/error_log do not show clear error message. I kindly request for a fix of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant