Convert HTML to PDF in Nodejs

Without Puppeteer, phantomjs or any other headless browser.

To convert an HTML to PDF in the backend, you usually need a headless browser like Puppeteer or phantomjs. The downside of headless browsers is that they are resource intensive. If you need to convert an HTML in Nodejs, is there a way to do so without them? The answer is yes but with a caveat: The HTML should be relatively simple, and you will only have a few options to style the document.

[Read More]
nodejs  script  pdf 

Reduce JS Size With Constant Strings

Refactor for micro-optimization of frontend packages, scripts, and bundles.

Do Repeated string literals in the JavaSript codebase increase the final file size? Yes, they do. Does it matter? Not for the backend applications, but for frontend applications – and anything that contributes towards them – it does. For example, npm packages and directly loaded scripts, server-side rendered web applications, and SPAs such as Angular, React, and Vue.

[Read More]

Remove Whitespaces Between Markdown Markers

To fix Bold, Italic, and Strikethrough tags.

Markdown Whitespace Inconsistencies

Markdown spec outlines markers, such as the asterisk (*), underscore (_), and double tilde (~~), for bold, italic and strikethrough, (or otherwise known as strong, emphasis, and delete), but requires these markers to wrap the text content on left and right without any whitespace(s). Any space on either side makes the markers appear as is instead of valid HTML tags after parsing/translation.

[Read More]

Multiple Ways to Build APIs to Use Airtable Data in Applications

With their advantages and disadvantages

Airtable is a tool much like Google sheets, only way more advanced; it is a low-code platform for building collaborative applications. You might be interested in consuming Airtable data in your applications, especially MVPs or POCs. For that, you can build APIs that return data sourced from Airtable. [Read More]
When you purchase through links on techighness.com, I may earn an affiliate commission.