pdf

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pdf contains the pdf node: it renders the incoming payload to a PDF document (invoices, reports). Two modes: "text" (payload string becomes a paginated text PDF) and "template" (payload {title, fields, table, body} drives a report layout).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PDFConfig

type PDFConfig struct {
	// Mode: "text" (payload string -> paginated text PDF) or
	// "template" (payload drives a title/fields/table layout).
	Mode     string `json:"mode"`
	Filename string `json:"filename"`
	// Title is the heading for template mode; a payload "title" key
	// wins when present.
	Title string `json:"title"`
}

PDFConfig holds the `pdf` node configuration.

type PDFNode

type PDFNode struct {
	*nodebase.BaseNode
	// contains filtered or unexported fields
}

PDFNode renders the incoming payload to a PDF document. Output: msg.Payload = PDF bytes; Metadata["file"] carries {suggestedName, contentType:"application/pdf", size} and Metadata["filename"] the suggested name so a `file` node with filenameType "msg" writes it directly.

func NewPDFNode

func NewPDFNode(node nodestore.NodeInterface, cfg *PDFConfig) *PDFNode

NewPDFNode creates a new pdf node.

func (*PDFNode) Execute

Execute renders the payload to PDF and stamps the file metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL