pdf

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2025 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCertificate

func GenerateCertificate(
	filename string,
	fileData []byte,
	timestampFile *ots.File,
	options CertificateOptions,
) (*bytes.Buffer, error)

GenerateCertificate generates a PDF certificate for an OpenTimestamps timestamp It returns a bytes.Buffer containing the PDF data

func WriteToFile

func WriteToFile(buf *bytes.Buffer, outputPath string) error

WriteToFile writes the certificate buffer to a file

Types

type CertificateOptions

type CertificateOptions struct {
	// Title for the PDF document
	Title string
	// Additional comment to include in the certificate
	Comment string
	// Whether to include the original file content in the PDF (for text files only)
	IncludeContent bool
	// URL of Esplora API for fetching block information
	EsploraURL string
}

CertificateOptions contains options for generating a PDF certificate

func DefaultOptions

func DefaultOptions() CertificateOptions

DefaultOptions returns the default certificate options

Jump to

Keyboard shortcuts

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