npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-pdf-lfs

v0.1.6

Published

Helps with LFS support of converting HTML to PDF with the help of Puppeteer

Downloads

10

Readme

NODE-PDF-LFS

Who is this package going help ?

  • To all the people who generat large amounts of HTML reports for any sort of execution / Process and want to convert them to PDF's due to requirements.
  • This can help you generate PDF's from your existing HTML REPORTS, I did bench-marks with 25000 pages of PDF conversion : Say a 400 MB HTML to PDF took about ~45 Mins
  • Yes < 5000 pages, you have it in less than ~5 mins, More the pages more the time. But let's assume your max cap is going to be 1 hr MAX

What issue does this solve ?

  • Chrome is our goto tool to generate PDF's atleast from HTML's, But when our size of HTML gets larger we end up facing issues
  • So here we follow a DIVIDE AND CONQUER method to get things done.

What's Special ?

  • Define what contents you expect in a A4-Size page of your report and split them with the tags
    <page></page>                       <!-- This defines your page split -->
    <globalsettings></globalsettings>   <!-- Defines what should be repeated in each page / HTML buffer -->
  • Supports CSS3, No matter how heavy your CSS is, The package handles it for you (Maybe try adjusting the variable --min-page-buffer if it's too heavy

Let's Get Started

Installation

NOTE

Always perform this in a empty directory. 
This is a standalone package, Not a dependancy (Atleast for now)
npm i node-pdf-lfs

PARAMETERS YOU CAN CONTROL

| CMD PARAMETER | VALUE IN SCRIPT | DETAIL | | ----------------------- | ----------------------- | ----------------------- | | --template-file | TEMPLATE_FILE | File to be treated for indexing with <page></page> and <globalsettings></globalsettings> | | --result-root | RESULT_ROOT | Location of storing the final PDF after completing the MERGE : default name -> temp-1.pdf | | --asset-root | ASSET_ROOT | Location where the TEMPLATE HTML file should look for assets | | --temp-root | TEMP_ROOT | Location where the temporary template html's will be stored | | --min-page-buffer | MIN_PAGE_BUFFER | The minimum pages that are indexed using <page></page> should be included in a file | | --verbose | DEBUG_FLAG | Displays all console.debug() logs for debugging purposes of indexing |

Example

Sample execution call with all parameters

node . --verbose --result-root="" --assset-root="" --temp-root="" --template-file="" --min-page-buffer=50

Bench Marks

imageimage

If you like the project a ⭐ to the REPO would mean a lot. ❤