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

Use case/update #24

Open
rreis27 opened this issue Dec 15, 2023 · 2 comments
Open

Use case/update #24

rreis27 opened this issue Dec 15, 2023 · 2 comments

Comments

@rreis27
Copy link

rreis27 commented Dec 15, 2023

I found after some testing with the latest version of the Dymo Connect Service (installed with DCDSetup1.4.4.1.exe) that you need to call getPrinters() prior to attempting to print. I was using VisitorManagement javascript sample in the DYMO DCD-SDK-Sample-master javascript and found that it works using the dymo.connect.framework.full.js. I did some analyzing of the code and found that when the DOM loads it calls the dymo.label.framework.getPrintersAsync(). I incorporated the call to getPrinters(), but in doing so I also modified it to be an async call. I've included the minimal changes below. I hope this helps someone else.

    async getPrinters() {
	if (typeof process !== 'undefined' && process.env) {
	    process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; // TODO: Bundle the certificates.
	}
			
    await fetcher(`${this.apiUrl}/GetPrinters`)
        .then((response) => response.text());
}
@seniorramirez
Copy link

Love u bro!
I had been looking for a way to make it work for a while, and the solution was the right one. thank you!

@mikeisadev
Copy link

For me nothing is working and I've tried all the solutions...

I hope to make it work...

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