How to convert URL to PDF?

Overview of a simple API that allows you to convert any webpage to a PDF document
11 October

PDFs can be generated in many ways, but one of them is to convert HTML+CSS content to a PDF. The URL to PDF Microservice just does that. This microservice allows you to render to PDF receipts, invoices, or any other content. 

Features

So, according to the developers, main advantages of this product are:

  • Rendered with Headless Chrome, using Puppeteer. The PDFs should match to the ones generated with a desktop Chrome.
  • Sensible defaults but everything is configurable.
  • Single-page app (SPA) support. Waits until all network requests are finished before rendering. A feature which even most of the paid services don't have.
  • Easy deployment to Heroku. We love Lambda but...Deploy to Heroku button.
  • Renders lazy loaded elements. (scrollPage option)
  • Supports optional x-api-key authentication. (API_TOKENS env var)

Here is an example of usage. 

Scheme of work
Scheme of work

Developers warn that you shouldn't serve this API publicly in the internet unless you are aware of the risks. It allows API users to run any JavaScript code inside a Chrome in the server. It's fairly easy to expose content of files in the server. You have been warned!

Learn more at GitHub.

What is Truffle?

Small introduction to the most popular Ethereum development framework
11 December

Truffle is a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier. 

According to the developers, these are main features: 

  • BUILT-IN SMART CONTRACT COMPILATION, LINKING, DEPLOYMENT AND BINARY MANAGEMENT
    • Truffle takes care of managing your contract artifacts so you don’t have to. Includes support for custom deployments, library linking and complex Ethereum applications.
  • AUTOMATED CONTRACT TESTING FOR RAPID DEVELOPMENT
    • Bring your dapp development to the 21st century. Write automated tests for your contracts in both JavaScript and Solidity, and get your contracts developed quickly.
  • SCRIPTABLE DEPLOYMENT & MIGRATIONS FRAMEWORK
    • Write simple, manageable deployment scripts that acknowledge your application will change over time. Foster your dapp’s evolution and ensure you can maintain your contracts far into the future.
  • NETWORK MANAGEMENT FOR DEPLOYING TO BOTH PUBLIC & PRIVATE NETWORKS
    • Don’t manage network artifacts ever again. Let Truffle do it for you, and put your focus on dapp development where it belongs.
  • ACCESS TO HUNDREDS OF EXTERNAL PACKAGES
    • Pull in hundreds of smart contract dependencies from NPM and EthPM to have your code stand on the shoulders of giants.
  • INTERACTIVE CONSOLE FOR DIRECT CONTRACT COMMUNICATION
    • Use Truffle to save time and talk to your contracts via an interactive console, which includes access to all your built contracts and all available Truffle commands.
  • EXTERNAL SCRIPT RUNNER THAT EXECUTES SCRIPTS WITHIN A TRUFFLE ENVIRONMENT
    • Use Truffle to bootstrap your contracts and run a network-aware script, without hassle.
  • BUILT FOR SPEED
    • Whether you’re compiling contracts or running unit tests, Truffle includes clever optimizations to ensure you only compile what you have to and your tests run as quickly as possible. When used along with Ganache, you can develop your dapps quickly and get real code deployed, fast.

Learn more at official website