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

@formio/viewer

v3.1.2

Published

A Form.io form viewer application

Readme

formio-viewer

A lightweight Form.io application that renders form submissions as HTML before being converted to PDF.

This simple Form.io application is used by the PDF Server to generate PDFs from form submissions. Using this library, you can customize the submission PDFs that are generated by the PDF server.

Getting Started

Becuase formio-viewer is mounted by the Form.io PDF Server, this library is not available via a package manager such as NPM or yarn. To use it, clone the repository.

# if using SSH
git clone [email protected]:formio/formio-viewer

# if using HTTPS
git clone https://github.com/formio/formio-viewer

You can now install dependencies as normal.

# if using npm
npm install

# if using yarn
yarn

Once you've made the desired modifications to the viewer, build the application.

# if using npm
npm run build

# if using yarn
yarn build

You can now mount the dist folder at the endpoint of your choice and point the PDF Server to it for generating PDF submissions either by adding the URL of your custom viewer to the Form Settings (on a form-by-form basis) or by setting the PDF Server's FORMIO_VIEWER environment variable to the URL of your custom viewer.

PLEASE NOTE that any modification of this library beyond adding basic HTML/CSS and/or custom assets is an advanced use case and is not recommended for users just starting out with the Form.io platform.

Example Usage

In this example, we'll add the Form.io logo to all of our PDF submissions.

First, we'll update index.html to include the logo. Since formio-viewer currently uses Bootstrap 4.x by default, we'll use Bootstrap's built in layout utilities and navbar class. Note that the logo is being served from the assets directory.

<!-- index.html -->
<!-- ... -->
<body>
  <div class="container-fluid main pf" id="main">
    <nav class="navbar navbar-light bg-light">
      <div class="d-flex"><h6>Our Custom </h3>
        <img src="assets/logo.png" width="100" alt="The Form.io Logo" />
        <h6> Viewer!</h6>
      </div>
    </nav>
  <!-- ... -->
  </div>
</body>
<!-- ... -->

After building our new viewer, we'll mount a simple HTTP server in the dist directory to check our work.

yarn build && cd dist && python -m http.server

Load a form into the text input (e.g. https://examples.form.io/example) and click "Show Form." You should see our new navbar component! Now each PDF submission generated using your custom viewer will contain this component.