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 🙏

© 2025 – Pkg Stats / Ryan Hefner

pagiko

v0.1.0

Published

PDF generation library that feels like home. Make PDFs the way you build UIs thanks to Tailwind and Flexbox.

Readme

Pagiko

Installation

bun add pagiko

Quick Start

You can quickly get started by creating an empty PDF.

import { pdf, page } from "pagiko";
const file = pdf().child(page());

Here, we created a PDF document with a single page. Once you've done with your layout, you can render the file into bytes.

const bytes = await file.renderToBytes();
//    ^ UInt8Array

With those bytes, you can write the file to your filesystem for example.

import { writeFile } from "node:fs/promises";
await writeFile("document.pdf", bytes);

But since this library also works in browsers, you can use whatever method you like to display or download the PDF depending on your needs.

API

pdf() - create a new document

.author() - set the author of the document

Set document's author metadata. The author will appear in the document properties section of most PDF readers.

pdf().author("Vexcited");

.font() - load a font to later use

This will add the font to the document, needed when you want to use a custom font later on. The default font is Helvetica.

import { pdf, font, StandardFonts } from "pagiko";
const times = font(StandardFonts.TimesRoman);

const buffer = new Uint8Array(/* ...a font file... */);
const custom = font(buffer);

// Load both fonts to be later used.
pdf().font(times).font(custom);

.child() - add a new page to document

Just like a tree, if you want to add pages to your document, you must use child for each page.

import { page } from "pagiko";

pdf()
  .child(page()) // Page 1
  .child(page()); // Page 2

page() - create a new page

.h() - set the height

Define a new height for the page, provided in pt.
Defaults to 841.89 which is the height in pt for an A4.

page().h(100.5);

.w() - set the width

Define a new width for the page, provided in pt.
Defaults to 595.28 which is the width in pt for an A4.

page().w(200.25);

.size() - set the width and height at the same time

Define a new width and height for the page, provided in pt.
Defaults to [595.276, 841.8898] which the width and height in pt for an A4.

import { PageSizes } from "pagiko";

page().size([200.25, 100.5]);
page().size(PageSizes.A7);

.child() - add elements to the page

Add elements to the root of the page, you can chain this function to add multiple elements to the root.

import { div, text } from "pagiko";

page
  .child(div()) // Add an empty div to the page
  .child(text("")); // Add an empty text to the page

Contributing

Quick Start

git clone https://github.com/Vexcited/Pagiko && cd Pagiko

bun install
bun run ./examples/... # run any example!

Release

I am using Mentor to automatically create releases for this package.

mentor

We're using semver for versioning.