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

P950NW: Add support for chainprinting (save tapefeed and tape) #7

Open
jab4 opened this issue Mar 25, 2022 · 0 comments
Open

P950NW: Add support for chainprinting (save tapefeed and tape) #7

jab4 opened this issue Mar 25, 2022 · 0 comments

Comments

@jab4
Copy link

jab4 commented Mar 25, 2022

Hi all and @boxine,
First, thanks for your software. I did some reverse engineering myself and hacked a text-only script in PHP.

Now the need arose to print raster graphics and I'm happy I found rasterprynt.

In __init__.py, I tried to hack chainprinting support myself to no avail, probably overlooked something.

   # yield b'\x1biC\x06\x1biM\x00'  # Various Mode settings: no auto cut
   # yield b'\x1bid\x00\x00'  # Margin = 0
     yield b'\x1biC\x05'  # Chainprint <<<< probably some bad sequence or overridden by later ESC sequence

Above semi-commented code prints with margin=0 and auto cut anyways.

What works for me in PHP is this snippet (0x1b==Esc, 0x69==i, 0x43==C) at the start:

            $seq.= "\x1b\x69\x61\x00"; # set command mode esc ia{command_mode}
            $seq.= "\x1b\x69\x43". bindec(implode('', [
                    0, # Bit 7: not used
                    0, # Bit 6: not used
                    0, # Bit 5: not used
                    0, # Bit 4: not used
                    0, # Bit 3: Special tape
                    1, # Bit 2: Chain printing
                    0, # Bit 1: Half cut
                    1, # Bit 0: Full cut
                ])); # set label cut settings (Esc i C)
            $seq.= "\x1b\x69\x6c\x00\x00"; # set label length: 0==auto
            $seq.= "\x1b\x24\x00\x00"; # set horiz position: 0

Any help how to make this work in rasterprynt would be highly appreciated.

@jab4 jab4 changed the title P950NW: Add support for chainprinting (save tapefeed, safe tape) P950NW: Add support for chainprinting (save tapefeed and tape) Mar 25, 2022
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