RelaxedJS/ReLaXed

Better PDF tooling support.

开放

#112 创建于 2018年9月3日

 (0 条评论) (3 个反应) (0 位负责人)JavaScript (466 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (11,805 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南