@aaqu/node-red-aaqu-pdf 0.4.4

node-red pdf creator

npm install @aaqu/node-red-aaqu-pdf

Important Information

Your support in the ongoing development of this library would be sincerely appreciated. 🙂

Buy Me a Coffee

The library requires testing and monitoring of RAM usage.

@aaqu/node-red-aaqu-pdf

A Node-RED node for operating on a PDF document.

This module provides a custom Node-RED node that:

  • get single page from pdf
  • display single page in flow

Get single page form pdf (file, http)

example.png

Display page in flow - need node-red-contrib-image-tools -> viewer

example2.png

Create empty PDF and draw text

create-pdf-draw-text.png


Features

  • Create empty PDF and draw text
  • Select a single page from pdf to buffer
  • Convert PDF page buffer to base64 image

Installation

Run the following command inside your Node-RED user directory (typically ~/.node-red):

npm install @aaqu/node-red-aaqu-pdf

Then restart Node-RED and the new node will appear in the editor palette.


Nodes usage

pdf get page

node-pdf-get-page.png

  • msg.payload - pdf buffer
  • msg.pdfPage – optional runtime override for the page number (starting at 1).
pdf multi page buffer → [pdf get page] → pdf single page buffer

where:

  • pdf multi page buffer input multi page buffer.
  • pdf get page extracts the configured page (or the page defined in msg.pdfPage) default page no 1.
  • pdf single page buffer return single page buffer.

pdf to img

node-pdf-to-img.png

  • msg.payload - pdf buffer input
pdf buffer → [pdf to img] → out base64

where:

  • pdf buffer a pdf file as buffer.
  • pdf to img extracts the page to image.
  • out base64 return image in base64 (to display use node-red-contrib-image-tools -> viewer).

pdf create

node-pdf-create.png

create PDF document

pdf add page

node-pdf-add-page.png

adding a page

pdf save

node-pdf-pdf-save.png

buil final PDF

pdf draw text

node-pdf-draw-text

add text to page PDF


Use cases

  • Fast display pdf in flow editor.
  • Extracting pages from automatically generated reports.
  • Preparing single-page documents for downstream processing.
  • Splitting large PDFs into smaller parts.
  • Creating lightweight attachments for email or APIs.

License

Apache-2.0

Node Info

Version: 0.4.4
Updated 6 days ago
License: Apache-2.0
Rating: not yet rated

Categories

Actions

Rate:

Downloads

871 in the last week

Nodes

  • pdf-get-page
  • pdf-to-img
  • pdf-create
  • pdf-add-page
  • pdf-save
  • pdf-draw-text

Keywords

  • node-red
  • pdf
  • aaqu

Maintainers