Table of Contents |
guest 2025-06-12 |
To export a notebook as a PDF, you must have correctly configured the Puppeteer service.
Once configured, you will see a button in your notebooks. Click and confirm that Notebook PDF is selected in the popup.
Adjust settings including:
Once a notebook has been approved (i.e. signed by reviewers), you'll be able to export the data in an archive format so that you can store it outside the system and refer later to the contents.
If you export both the data and the PDF, as shown above, the exported archive will be named following a pattern like:
[notebook ID].export.zip
It will contain both the PDF (named [notebook ID].pdf) and the notebook's data archive, named following a pattern like:
[notebook ID]_[approval date]_[approval time].notebook-snapshot.zip
The data archive includes structured details about the contents of the notebook, such as:
[notebook ID]_[approval date]_[approval time].notebook-snapshot.zip
│
├───summary
│ └───[Notebook Title]([Notebook ID]).tsv Notebook properties and values
│
└───referenced data
├───assay
│ └───[Assay Name]([Assay ID]).tsv Details for referenced assay runs
│
├───sample
│ ├───[Sample Type1].tsv Details for any referenced samples
│ └───[Sample Type2].tsv of each type included
│
└───more folders as needed for other referenced items
Puppeteer is an external web service that can be used to generate PDFs from Notebooks created with LabKey ELN. To use this service, you need to obtain the puppeteer premium module, and configure your LabKey Server as described in this topic.
puppeteer-service is a web service that allows for generation of assets (e.g. PDFs, screenshots) via Puppeteer.
Service Mode:
The puppeteer module has two configuration modes:
Remote mode is recommended for several reasons:
The "Remote URL" property specifies the URL where the web service can be found. This is provided by whomever sets up the puppeteer-service instance.
The version of Puppeteer is shown in the lower panel for your reference. Instructions for upgrading are available below.
puppeteer.enabled;startup=true
puppeteer.mode;startup=docker
puppeteer.docker.image;startup=lk-puppeteer-service:latest
puppeteer.docker.port;startup=3031
puppeteer.docker.remapLocalhost;startup=true
puppeteer.remote.url;startup=http://localhost:3031
The puppeteer-service can be deployed in a Docker container on either a Linux or OSX host. Docker is required to be installed on the host machine. You can retrieve the latest Docker image from Docker Hub using the following command:
docker pull labkeyteamcity/lk-puppeteer-service
This image can then be run in a container:
docker run -i --init --rm --cap-add=SYS_ADMIN -p 3031:3031 --name puppeteer-service labkeyteamcity/lk-puppeteer-service
To run the container so that it is persistent (i.e. so that it will survive server instance restarts), use the following:
sudo docker run -di --init --cap-add=SYS_ADMIN -p--restart unless-stopped --name puppeteer-service labkeyteamcity/lk-puppeteer-service
A simple HTML view has been added to allow for interacting with the service. To see this view navigate to http://localhost:3031 to get familiar.
Docker Image Docker mode only. The Docker Image property specifies the name of the puppeteer-service image that is available on the LabKey Server instance. This image has to be downloaded via docker. See service deployment documentation for how to pull down an image.
Docker Port The Docker Port property specifies what host port the service container should be bound to.
We publish a puppeteer container to hub.docker.com. The method to update to the new container is:
docker pull labkeyteamcity/lk-puppeteer-service
If puppeteer is running as a service, i.e. persistently, you will follow this process:
sudo docker stop puppeteer-service
sudo docker rm puppeteer-service
sudo docker pull labkeyteamcity/lk-puppeteer-service:latest
These commands can be run in one set to simplify the steps:
sudo docker stop puppeteer-service && sudo docker rm puppeteer-service && sudo docker pull labkeyteamcity/lk-puppeteer-service:latest
To confirm that you are running the latest container, you can inspect the puppeteer image and compare it to the running container:
sudo docker inspect labkeyteamcity/lk-puppeteer-service:latest | grep Id
sudo docker inspect puppeteer-service | grep Image