Documentation
¶
Overview ¶
Package merge implements PDF merge.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCannotMergePDFs = errors.New("cannot merge PDFs")
ErrCannotMergePDFs is returned when the input documents cannot be combined.
Functions ¶
func BytesSelected ¶ added in v0.2.2
func BytesSelected(ctx context.Context, selections ...PageSelection) ([]byte, error)
BytesSelected merges the selected pages of each source PDF into one document, preserving the requested page order. It observes ctx between documents. Unselected pages are removed from the merged page tree; their underlying objects remain in the file so cross-references (for example outline destinations) stay resolvable.
Types ¶
type PageSelection ¶ added in v0.2.2
PageSelection selects zero-based pages of one source PDF. Pages lists the page indexes to include, in output order; indexes may repeat.