Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsurePdfcpuInit ¶
func EnsurePdfcpuInit()
EnsurePdfcpuInit initializes pdfcpu's global state exactly once. This must be called before any concurrent use of pdfcpu's NewDefaultConfiguration(). Safe to call from multiple goroutines; only the first call does work.
func EnsurePdfiumPoolInit ¶ added in v0.0.21
func EnsurePdfiumPoolInit() error
EnsurePdfiumPoolInit initializes the go-pdfium WASM pool if not already done. Safe to call multiple times; initialization happens at most once.
func Parse ¶
func Parse(path string) (*mediafile.ParsedMetadata, error)
Parse reads metadata from a PDF file and returns it in the mediafile.ParsedMetadata format for compatibility with the existing scanner.
func PdfiumInstance ¶ added in v0.0.21
PdfiumInstance returns a pdfium instance from the shared WASM pool. The caller must call instance.Close() when done to return it to the pool.
Types ¶
type OutlineEntry ¶ added in v0.0.21
OutlineEntry represents a single bookmark from a PDF's outline tree.
func ExtractOutline ¶ added in v0.0.21
func ExtractOutline(path string) ([]OutlineEntry, error)
ExtractOutline extracts the bookmark/outline tree from a PDF and returns a flat list of entries with their target page numbers. Returns nil (not an error) if the PDF has no bookmarks.