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

Anyone figure out how to print multiple copies and feed after the last copy? #37

Open
tcbennun opened this issue Sep 6, 2022 · 7 comments

Comments

@tcbennun
Copy link
Contributor

tcbennun commented Sep 6, 2022

The raster manual specifies this advanced mode setting:

No chain printing
When printing multiple copies, the labels are fed after the last one is printed.

But I can't see anywhere how to actually print multiple copies of the same label...?

@tcbennun
Copy link
Contributor Author

tcbennun commented Sep 6, 2022

Ah, I missed the flowchart on page 40 (44 of pdf). I'm finding it cuts in the wrong place between pages, though...

@tcbennun
Copy link
Contributor Author

tcbennun commented Sep 6, 2022

For posterity...

With 24mm tape on a P710BT, got multiple copies working by...

  • removing margin setting from initialization
  • looping raster data send and print - once per copy
  • set the margins within this loop; but for every copy except the first one, set the margins to the intended value + 16
  • use print() for every copy except the final one, which uses print_and_feed()

I'll try to neaten and PR this, right now it's just a hack to get done what I need to get done.

Thanks @ryankurte for this repo, by the way, really saved me here!

@ryankurte
Copy link
Owner

glad it is helpful and, nice work! it'd definitely be a neat addition here if you're up for it :-P

@kamnxt
Copy link
Contributor

kamnxt commented Aug 20, 2024

@tcbennun Sorry for bumping this after two years but have you figured some way of printing several different labels at once, without the NO_CHAIN option?

@tcbennun
Copy link
Contributor Author

@kamnxt My memory fails me, but I do have a branch on my fork of the repo, which looks relevant: https://github.com/tcbennun/rust-ptouch/tree/margins-and-copies

Beyond that I probably can't be much help.

Good luck!

@kamnxt
Copy link
Contributor

kamnxt commented Sep 3, 2024

Decided to take things into my own hands and capture some data from the official software. This is a print with two different labels, with a cutline between (so two separate labels)

1b 69 61 01 # switch dynamic command mode (raster)
1b 69 55 4a 00 0c 52 54 00 12 34 56 00 00 04 00 00 00 # ???
1b 69 7a 00 00 0c 00 5f 00 00 00 00 00 # print info (00, 00, width: 0c=12, length: 0, raster number: 5f00, 0=starting page
1b 69 4d 00 # various mode settings blank
1b 69 4b 0c # advanced mode settings = 0b00001100 half cut on, no chain printing
1b 69 64 0e 00 # margin/feed (77 dots)
4d 00 # no compression
47 10 00 00 ...... transfer
...
0c # print, no feed

1b 69 61 01 # dynamic command mode (raster)
1b 69 55 4a 00 0c 52 54 00 12 34 56 00 00 04 00 00 00 # unknown ??
1b 69 7a 00 00 0c 00 3c 00 00 00 01 00  # print info (00, 00, width: 0c=12, length: 0, raster number: 3c00, 1=other page
1b 69 4d 00 # various mode blank
1b 69 4b 0c # advanced mode same
1b 69 64 0e 00 # margin/feed same
 4d 00 # compression: none
47 10 00 00...
1a # print with feed

There's an undocumented command (1b 69 55 4a...), not sure what it does. Tried to modify my code to write more similar values and found out that if recover is set, it will happily try to feed a lot of tape until manually turned off... whoops.

...but in the end I managed to get this to work! I'll try to create a PR at some point soon.
Imagepipe_50

@kamnxt
Copy link
Contributor

kamnxt commented Sep 5, 2024

@ryankurte I have put what I have found here. Added a test binary (cargo run --bin ptouch-test). If you have a better idea for the API let me know. Also, would be neat to be able to pass the options (like NO_CHAIN or AUTO_CUT) to print somehow. Not sure if all the changes in my fork are actually necessary, but at this point they work and I don't see a point in wasting more label tape...

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