PDF rendering with Node & Typescript
Adapter is a structural design pattern that allows objects with incompatible interfaces to collaborate.
Abstract Factory is a creational design pattern that lets you produce families of related objects without specifying their concrete classes.
Facade is a structural design pattern that provides a simplified interface to a library, a framework, or any other complex set of classes.
Builder is a creational design pattern that lets you construct complex objects step by step. The pattern allows you to produce different types and representations of an object using the same construction code.
Facade is a structural design pattern that provides a simplified interface to a library, a framework, or any other complex set of classes.
Command is a behavioral design pattern that turns a request into a stand-alone object that contains all information about the request. This transformation lets you pass requests as a method arguments, delay or queue a request’s execution, and support undoable operations.
The goal of Context Object is not to pass lots of parameters to methods implicitly, as a means of by-passing strong typing and encapsulation. The goal is to store scoped data in a general, but managed way, independent of protocols and presentation technology.
Path | Description |
---|---|
persons | Directory with YAML files with personal details that can be referenced. |
topics | Directory with YAML files with topics details that can be referenced. |
config | Directory with YAML files with general configuration. |
books | Directory with YAML files defining books. |
code | Directory with YAML files with code blocks that can be referenced. |
i18n | Directory with YAML files defining translations. |
Path | Description |
---|---|
fonts | This directory contains the files defining fonts. |
images | This directory contains the images files that can be referenced. |
Path | Description |
---|---|
render.js | The Node command line interface for rendering content. |
builds | This directory containes the results of rendering the books. |
src | This directory contains the Node code that implements this application. |
src/command.ts | Application command line interface handler. |
src/enums | Application constants. |
src/vocabulary | Application vocabulary used for scoring the quality of the text. |
src/interfaces | Application interfaces. |
src/models | Application models. |
src/serializers | Application serializer interfaces. |
src/errors | Application errors. |
Path | Description |
---|---|
src/ebook | e-book rendering files. |
src/video | Video rendering files. |
src/html | HTML rendering files. |
src/course | Course rendering files. |
yarn install
yarn run build && yarn run render --title "Sample" --language "en" --format "ebook"
The PDF is available here
yarn run build && yarn run render --title "Sample" --language "es" --format "ebook"
The PDF is available here
yarn run build && yarn run render --title "Sample" --language "en,es" --format "ebook"
The PDF is available here and here
yarn run build && yarn run render --title "Start" --language "en" --format "ebook"
yarn run build && yarn run render --title "Start" --language "es" --format "ebook"