RelaxedJS/ReLaXed

Better PDF tooling support.

Offen

#112 geöffnet am 03.09.2018

 (0 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)JavaScript (466 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (11.805 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I have been working on a separate project that wraps the puppeteers PDF system to add missing functionality, including custom headers/footers and pages. I just pushed an early build of it here.

I created this as a separate project as I have seen requests for a ReLaXed API to generate PDFs from existing HTML documents. Because those would not need all the additional features of ReLaXed having a separate project (package) for that was ideal.

I have not implemented a way to build the document from an entire HTML string (or file) yet, but I do have an idea in mind of how to do it. Additionally, I think I have a solution for dealing with page-breaks with this system.

This system creates a document, currently, by creating separate pages, then in each page you add body content, header/footer content, etc. All these elements have overflow: hidden so if your content goes beyond the size limits it is simply hidden. When the fromHTML is done it will automatically overflow into a new page.

The lib/Document.spec.js test file (which it currently is not run as) will output an example pdf.

I currently have very little documentation or code commenting done so understanding the system will require a bit of work.

Contributor Guide