question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem when calling from an Electron app

See original GitHub issue

Thanks for this awesome package, it will solve me a lot of problems 😃

Now, I am using it in NodeJs, and all is file, the problem is that I don’t know how to save the return of .asBlob to a file, it comes out something like [blob object] ! Here is my code

                // Renders the HTML template
                var html = this.render(template, values);

                // Convert the html to open xml format
                var output = html2docx.asBlob(html, {
                    'margins': {'top': 200}
                });

                console.log(output);

                // Save the output
                fileSystem.writeFileSync(outputFile, output);

Here is the output object contents capture

What should i change to get it to save this “blob” to a file ? Thanks

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tamkeen-tmscommented, Dec 11, 2016

Yes actually. Instead of requiring the library through Node.js I called it in the HTML file the App will be showing, as a javascript asset. And it’s working just fine.

0reactions
tamkeen-tmscommented, May 19, 2019

Yes actually. Instead of requiring the library through Node.js I called it in the HTML file the App will be showing, as a javascript asset. And it’s working just fine.

“I called it” you called what exactly?

The library, what else could it be?!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron app - audio issues - Stack Overflow
We are facing one issue in that. Application starts properly user is able to converse on calls with 2 way audio I/P and...
Read more >
[Bug]: Electron 19.x still crashes when call app ... - GitHub
I tried to fix this by setting entitlements, but It seems to be hard/impossible to set that singleton socket file to be allowed...
Read more >
Performance | Electron
A set of guidelines for building performant Electron apps.
Read more >
What Is Electron and Why Is It So Polarizing? - KIRUPA
Having the ability to call native APIs allows Electron apps to meet any native app eye-to-eye when it comes to features. This ability...
Read more >
Building a video call overlay app with Electron and Daily (Part 1)
How to make a custom video call app with Daily and Electron: app structure and main process setup of an Electron application to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found