Skip to content

Fails to work with node-thermal-printer since Buffer passed is referenced instead of copied #1

@andidev

Description

@andidev

First thanks for the cleanest version of the node printer forks out there! 🎊

All seems to work fine except the Buffer reference logic.
When using this lib with https://github.com/Klemen1337/node-thermal-printer then you get the following error when trying to print something

#
# Fatal error in v8::HandleScope::CreateHandle()
# Cannot create a handle without a HandleScope
#

it looks like n-api cannot handle refefrences so instead would be better to write to file or copy the buffer instead with the current logic that already exists in current implementation.
I will go ahead and create a PR for this with the hope this fork will be maintained.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions