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

Cannot send as raw #8

Open
cbichis opened this issue Aug 17, 2018 · 4 comments
Open

Cannot send as raw #8

cbichis opened this issue Aug 17, 2018 · 4 comments

Comments

@cbichis
Copy link

cbichis commented Aug 17, 2018

Hi,

For some printers is needed to send the file as raw. By example from terminal I send using this:

lpr -P Zebra-Technologies-ZTC-TLP-2824-Plus -o raw path/to/label.zpl

Which works perfectly, printing the label.

However, trying to send using raw doesnt seems to work with smalot/cups-ipp.

I have created a custom version of config yaml files adding to job.yaml this line:

raw:
    tag: 'no-value'

This is needed to get over this:
PHP Fatal error: Uncaught Smalot\Cups\CupsException: Property not found: "raw" .....

After this the Builder was created with the new option set:

$builder = new Builder('./config/cups-ipp/');
$builder->buildProperty('raw', 'no-value');//not sure if actually needed

and the job attribute was set:
$job->addAttribute('raw', null);

However, even after fixing this the (print) output of this is text, the ZPL commands from the submitted file.

@olibar
Copy link

olibar commented May 7, 2019

@cbichis
Hello did you manage to solve this ? I need to do the same as you

@cbichis
Copy link
Author

cbichis commented May 7, 2019

Sending the ZPL using sockets will work, no need of command line and cups.

@olibar
Copy link

olibar commented May 7, 2019

thanks so you are not using this code in the end

@fireatwill
Copy link

Setting the mime type to application/vnd.cups-raw seems to work for me.

e.g.:

$job = new Job();
$job->addText('^XA...^XZ', '', 'application/vnd.cups-raw');

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

3 participants