Skip to content

bryntum/pdf-export-server

Repository files navigation

PDF export server

This repository contains sources for a server which builds PDF and PNG files out of HTML fragments. Server is designed to work with Bryntum PDF Export feature. See compatibility table between Export server and other Bryntum products in this table.

Live demos available here:

Features

  • Uses headless chromium browser.
  • Runnable as NodeJS instance.
  • Docker container available at Docker Hub
  • Can be assembled to a single executable file
  • Written in JavaScript and fully adaptable.
  • Can be used as standalone service or as an intermediary between your (C#, Java, PHP) frontend and backend.

Getting started

Using NodeJS

Supported Node versions:

1.0.0+: Node >=8 <14
2.0.0+: Node >= 20
  1. Check out this repository
git clone git@github.com:bryntum/pdf-export-server.git
cd pdf-export-server 
  1. Install packages
pdf-export-server$ npm i
  1. Start the server
pdf-export-server$ npm run start
Access-Control-Allow-Origin: *
Http server started on port 8080

Multiple configuration options are available as you can see in the configuration guide.

Using image from Docker Hub

For your convenience we have pre-built container available on Docker Hub.

  1. Pull it
docker pull bryntum/pdf-export-server
  1. Create docker-compose.yml and configure image/port forwarding
version: "3.9"
services:
  web:
    image: "bryntum/pdf-export-server:latest"
    ports:
      - "8080:8080"
  1. Start container
docker compose -f docker-compose.yml up

You can also build image from source as described in the Docker guide

Building Executable

To create a standalone executable file for the PDF Export Server, follow the detailed instructions provided in the Building executable guide. This process ensures that the server can run independently without needing a Node.js environment.

Steps to Build

  1. Install Prerequisites
  • Ensure you have the required Node.js version (as mentioned in the Getting Started section).
  • Make sure all dependencies are installed:
    npm i
  1. Run the Build Command
    Execute the following command to create the executable:

    npm run build
  2. Run the Executable
    Once the executable is built, you can launch the server directly without any external dependencies:

    ./dist/pdf-export-server*

Links

FAQ

Please refer to the FAQ for common questions and issues.

About

The server producing the exported PDF versions of various Bryntum UI components

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors