@postscriptum.app/core
TypeScript icon, indicating that this package has built-in type declarations

0.14.0-rc • Public • Published

postscriptum-core

This javascript library is the core component of Postscriptum.

It transforms the HTML content into a paginated one, without relying on the browser fragmentation support.

Postscriptum

Postscriptum is a solution to produce PDF from HTML with the help of CSS Print.

Please refer to https://postscriptum.app for a global picture of the project.

Installation

postscriptum-core is downloadable from the release page of the project on GitLab. It is also available on npm.

Usage

To paginate the complete page as soon as possible, include the Postscriptum script in the page with the attribute ps-paginate.

<script src="postscriptum.min.js" ps-paginate></script>

To start programmatically the pagination then the print:

<script src="postscriptum.min.js"></script>
<script>
	document.addEventListener('DOMContentLoaded', async () => {
		await postscriptum.pagination({ source: document.body }).start().ended;
		print();
	});
</script>

License

MIT

Package Sidebar

Install

npm i @postscriptum.app/core

Weekly Downloads

7

Version

0.14.0-rc

License

MIT

Unpacked Size

2.98 MB

Total Files

201

Last publish

Collaborators

  • rivron