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

CUPS Printer driver unable to print #3

Closed
rezuankassim opened this issue Sep 4, 2020 · 2 comments
Closed

CUPS Printer driver unable to print #3

rezuankassim opened this issue Sep 4, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rezuankassim
Copy link

rezuankassim commented Sep 4, 2020

Description

Unable to print via CUPS driver, getting 'A non-numeric value encountered'

$printers = Printing::printers();

Printing::newPrintTask()
    ->file(public_path('sample.pdf'))
    ->printer($printers->first()->id())
    ->send();

Screenshot 2020-09-04 at 5 39 40 PM

Screenshot 2020-09-04 at 5 42 21 PM

Steps to reproduce

  1. Used CUPS driver to print

Context

  • Laravel Printing version: 1.2.0
  • Laravel version: 7.27.0
@rezuankassim rezuankassim added the bug Something isn't working label Sep 4, 2020
@rawilk
Copy link
Owner

rawilk commented Sep 5, 2020

Thanks for taking the time to bring this issue to my attention. I have been able to replicate the issue on my end, so I will see if there's anything I can update in the package to make it work.

rawilk pushed a commit that referenced this issue Sep 5, 2020
@rawilk
Copy link
Owner

rawilk commented Sep 5, 2020

Version 1.2.1 should fix this issue. The library I use to send the jobs to a CUPS print server requires a page range to be set. I was setting it to "1-" if a range has not been specified already to signify printing the entire document, but the library won't accept that. I've changed it to print pages "1-999", which should be more than enough in the majority of cases.

If you somehow have a document more than 999 pages to be printed, make sure you specify the needed page range via the range function when creating a new print task.

See smalot/cups-ipp#7 for more information.

@rawilk rawilk closed this as completed Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants