Versions in this module Expand all Collapse all v1 v1.0.3 Nov 2, 2023 v1.0.2 Nov 2, 2023 Changes in this version + func AddAnnotations(rs io.ReadSeeker, w io.Writer, selectedPages []string, ...) error + func AddAnnotationsAsIncrement(rws io.ReadWriteSeeker, selectedPages []string, ar model.AnnotationRenderer, ...) error + func AddAnnotationsFile(inFile, outFile string, selectedPages []string, ar model.AnnotationRenderer, ...) (err error) + func AddAnnotationsMap(rs io.ReadSeeker, w io.Writer, m map[int][]model.AnnotationRenderer, ...) error + func AddAnnotationsMapAsIncrement(rws io.ReadWriteSeeker, m map[int][]model.AnnotationRenderer, ...) error + func AddAnnotationsMapFile(inFile, outFile string, m map[int][]model.AnnotationRenderer, ...) (err error) + func AddAttachments(rs io.ReadSeeker, w io.Writer, files []string, coll bool, ...) error + func AddAttachmentsFile(inFile, outFile string, files []string, coll bool, conf *model.Configuration) (err error) + func AddBookmarks(rs io.ReadSeeker, w io.Writer, bms []pdfcpu.Bookmark, replace bool, ...) error + func AddBookmarksFile(inFile, outFile string, bms []pdfcpu.Bookmark, replace bool, ...) (err error) + func AddBoxes(rs io.ReadSeeker, w io.Writer, selectedPages []string, ...) error + func AddBoxesFile(inFile, outFile string, selectedPages []string, pb *model.PageBoundaries, ...) error + func AddImageWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, ...) error + func AddImageWatermarksForReaderFile(inFile, outFile string, selectedPages []string, onTop bool, r io.Reader, ...) error + func AddKeywords(rs io.ReadSeeker, w io.Writer, files []string, conf *model.Configuration) error + func AddKeywordsFile(inFile, outFile string, files []string, conf *model.Configuration) (err error) + func AddPDFWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, ...) error + func AddProperties(rs io.ReadSeeker, w io.Writer, properties map[string]string, ...) error + func AddPropertiesFile(inFile, outFile string, properties map[string]string, ...) (err error) + func AddTextWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, text, desc string, ...) error + func AddWatermarks(rs io.ReadSeeker, w io.Writer, selectedPages []string, wm *model.Watermark, ...) error + func AddWatermarksFile(inFile, outFile string, selectedPages []string, wm *model.Watermark, ...) (err error) + func AddWatermarksMap(rs io.ReadSeeker, w io.Writer, m map[int]*model.Watermark, ...) error + func AddWatermarksMapFile(inFile, outFile string, m map[int]*model.Watermark, conf *model.Configuration) (err error) + func AddWatermarksSliceMap(rs io.ReadSeeker, w io.Writer, m map[int][]*model.Watermark, ...) error + func AddWatermarksSliceMapFile(inFile, outFile string, m map[int][]*model.Watermark, ...) (err error) + func Booklet(rs io.ReadSeeker, w io.Writer, imgFiles, selectedPages []string, ...) error + func BookletFile(inFiles []string, outFile string, selectedPages []string, nup *model.NUp, ...) (err error) + func BookletFromImages(conf *model.Configuration, imageFileNames []string, nup *model.NUp) (*model.Context, error) + func Box(s string, u types.DisplayUnit) (*model.Box, error) + func ChangeOwnerPassword(rs io.ReadSeeker, w io.Writer, pwOld, pwNew string, conf *model.Configuration) error + func ChangeOwnerPasswordFile(inFile, outFile string, pwOld, pwNew string, conf *model.Configuration) (err error) + func ChangeUserPassword(rs io.ReadSeeker, w io.Writer, pwOld, pwNew string, conf *model.Configuration) error + func ChangeUserPasswordFile(inFile, outFile string, pwOld, pwNew string, conf *model.Configuration) (err error) + func Collect(rs io.ReadSeeker, w io.Writer, selectedPages []string, ...) error + func CollectFile(inFile, outFile string, selectedPages []string, conf *model.Configuration) (err error) + func Create(rs io.ReadSeeker, rd io.Reader, w io.Writer, conf *model.Configuration) error + func CreateCheatSheetsUserFonts(fontNames []string) error + func CreateFile(inFilePDF, inFileJSON, outFilePDF string, conf *model.Configuration) (err error) + func CreatePDFFile(xRefTable *model.XRefTable, outFile string, conf *model.Configuration) error + func CreateUserFontDemoFiles(dir, fn string) error + func Crop(rs io.ReadSeeker, w io.Writer, selectedPages []string, b *model.Box, ...) error + func CropFile(inFile, outFile string, selectedPages []string, b *model.Box, ...) error + func Cut(rs io.ReadSeeker, outDir, fileName string, selectedPages []string, ...) error + func CutFile(inFile, outDir, outFile string, selectedPages []string, cut *model.Cut, ...) error + func Decrypt(rs io.ReadSeeker, w io.Writer, conf *model.Configuration) error + func DecryptFile(inFile, outFile string, conf *model.Configuration) (err error) + func DisableConfigDir() + func DumpObject(rs io.ReadSeeker, objNr int, hex bool, conf *model.Configuration) error + func DumpObjectFile(inFile string, objNr int, hex bool, conf *model.Configuration) error + func Encrypt(rs io.ReadSeeker, w io.Writer, conf *model.Configuration) error + func EncryptFile(inFile, outFile string, conf *model.Configuration) (err error) + func EnsureDefaultConfigAt(path string) error + func ExportForm(rs io.ReadSeeker, w io.Writer, source string, conf *model.Configuration) error + func ExportFormFile(inFilePDF, outFileJSON string, conf *model.Configuration) (err error) + func ExportFormToStruct(rs io.ReadSeeker, source string, conf *model.Configuration) (*form.FormGroup, error) + func ExtractAttachments(rs io.ReadSeeker, outDir string, fileNames []string, conf *model.Configuration) error + func ExtractAttachmentsFile(inFile, outDir string, files []string, conf *model.Configuration) error + func ExtractAttachmentsRaw(rs io.ReadSeeker, outDir string, fileNames []string, conf *model.Configuration) ([]model.Attachment, error) + func ExtractContent(rs io.ReadSeeker, outDir, fileName string, selectedPages []string, ...) error + func ExtractContentFile(inFile, outDir string, selectedPages []string, conf *model.Configuration) error + func ExtractFonts(rs io.ReadSeeker, outDir, fileName string, selectedPages []string, ...) error + func ExtractFontsFile(inFile, outDir string, selectedPages []string, conf *model.Configuration) error + func ExtractImages(rs io.ReadSeeker, selectedPages []string, ...) [][]byte + func ExtractImagesRaw(rs io.ReadSeeker, selectedPages []string, conf *model.Configuration) ([]map[int]model.Image, error) + func ExtractMetadata(rs io.ReadSeeker, outDir, fileName string, conf *model.Configuration) error + func ExtractMetadataFile(inFile, outDir string, conf *model.Configuration) error + func ExtractPages(rs io.ReadSeeker, outDir, fileName string, selectedPages []string, ...) error + func ExtractPagesFile(inFile, outDir string, selectedPages []string, conf *model.Configuration) error + func FillForm(rs io.ReadSeeker, rd io.Reader, w io.Writer, conf *model.Configuration) error + func FillFormFile(inFilePDF, inFileJSON, outFilePDF string, conf *model.Configuration) (err error) + func GetPermissions(rs io.ReadSeeker, conf *model.Configuration) (*int16, error) + func GetPermissionsFile(inFile string, conf *model.Configuration) (*int16, error) + func HasWatermarks(rs io.ReadSeeker, conf *model.Configuration) (bool, error) + func HasWatermarksFile(inFile string, conf *model.Configuration) (bool, error) + func ImageBookletConfig(val int, desc string) (*model.NUp, error) + func ImageGridConfig(rows, cols int, desc string) (*model.NUp, error) + func ImageNUpConfig(val int, desc string) (*model.NUp, error) + func ImageWatermark(fileName, desc string, onTop, update bool, u types.DisplayUnit) (*model.Watermark, error) + func ImageWatermarkForReader(r io.Reader, desc string, onTop, update bool, u types.DisplayUnit) (*model.Watermark, error) + func Import(s string, u types.DisplayUnit) (*pdfcpu.Import, error) + func ImportImages(rs io.ReadSeeker, w io.Writer, imgs []io.Reader, imp *pdfcpu.Import, ...) error + func ImportImagesFile(imgFiles []string, outFile string, imp *pdfcpu.Import, ...) (err error) + func Info(rs io.ReadSeeker, selectedPages []string, conf *model.Configuration) ([]string, error) + func InfoFile(inFile string, selectedPages []string, conf *model.Configuration) ([]string, error) + func InfoFiles(inFiles []string, selectedPages []string, conf *model.Configuration) ([]string, error) + func InsertPages(rs io.ReadSeeker, w io.Writer, selectedPages []string, before bool, ...) error + func InsertPagesFile(inFile, outFile string, selectedPages []string, before bool, ...) (err error) + func InstallFonts(fileNames []string) error + func ListAnnotations(rs io.ReadSeeker, selectedPages []string, conf *model.Configuration) (int, []string, error) + func ListAnnotationsFile(inFile string, selectedPages []string, conf *model.Configuration) (int, []string, error) + func ListAttachments(rs io.ReadSeeker, conf *model.Configuration) ([]string, error) + func ListAttachmentsCompact(rs io.ReadSeeker, conf *model.Configuration) ([]string, error) + func ListAttachmentsCompactFile(inFile string, conf *model.Configuration) ([]string, error) + func ListAttachmentsFile(inFile string, conf *model.Configuration) ([]string, error) + func ListBoxes(rs io.ReadSeeker, selectedPages []string, pb *model.PageBoundaries, ...) ([]string, error) + func ListBoxesFile(inFile string, selectedPages []string, pb *model.PageBoundaries, ...) ([]string, error) + func ListFonts() ([]string, error) + func ListFormFields(rs io.ReadSeeker, conf *model.Configuration) ([]string, error) + func ListFormFieldsFile(inFiles []string, conf *model.Configuration) ([]string, error) + func ListImages(rs io.ReadSeeker, selectedPages []string, conf *model.Configuration) ([]string, error) + func ListImagesFile(inFiles []string, selectedPages []string, conf *model.Configuration) ([]string, error) + func ListKeywords(rs io.ReadSeeker, conf *model.Configuration) ([]string, error) + func ListKeywordsFile(inFile string, conf *model.Configuration) ([]string, error) + func ListPermissions(rs io.ReadSeeker, conf *model.Configuration) ([]string, error) + func ListPermissionsFile(inFile string, conf *model.Configuration) ([]string, error) + func ListProperties(rs io.ReadSeeker, conf *model.Configuration) ([]string, error) + func ListPropertiesFile(inFile string, conf *model.Configuration) ([]string, error) + func LoadConfiguration() *model.Configuration + func LockFormFields(rs io.ReadSeeker, w io.Writer, fieldIDsOrNames []string, ...) error + func LockFormFieldsFile(inFile, outFile string, fieldIDsOrNames []string, conf *model.Configuration) (err error) + func Merge(destFile string, inFiles []string, w io.Writer, conf *model.Configuration) error + func MergeAppendFile(inFiles []string, outFile string, conf *model.Configuration) (err error) + func MergeCreateFile(inFiles []string, outFile string, conf *model.Configuration) (err error) + func MergeRaw(rsc []io.ReadSeeker, w io.Writer, conf *model.Configuration) error + func MultiFillForm(inFilePDF string, rd io.Reader, outDir, fileName string, ...) error + func MultiFillFormFile(inFilePDF, inFileData, outDir, outFilePDF string, merge bool, ...) (err error) + func NDown(rs io.ReadSeeker, outDir, fileName string, selectedPages []string, n int, ...) error + func NDownFile(inFile, outDir, outFile string, selectedPages []string, n int, cut *model.Cut, ...) error + func NUp(rs io.ReadSeeker, w io.Writer, imgFiles, selectedPages []string, ...) error + func NUpFile(inFiles []string, outFile string, selectedPages []string, nup *model.NUp, ...) (err error) + func NUpFromImage(conf *model.Configuration, imageFileNames []string, nup *model.NUp) (*model.Context, error) + func Optimize(rs io.ReadSeeker, w io.Writer, conf *model.Configuration) error + func OptimizeContext(ctx *model.Context) error + func OptimizeFile(inFile, outFile string, conf *model.Configuration) (err error) + func PDFBookletConfig(val int, desc string) (*model.NUp, error) + func PDFGridConfig(rows, cols int, desc string) (*model.NUp, error) + func PDFNUpConfig(val int, desc string) (*model.NUp, error) + func PDFWatermark(fileName, desc string, onTop, update bool, u types.DisplayUnit) (*model.Watermark, error) + func PageBoundaries(s string, unit types.DisplayUnit) (*model.PageBoundaries, error) + func PageBoundariesFromBoxList(s string) (*model.PageBoundaries, error) + func PageCount(rs io.ReadSeeker, conf *model.Configuration) (int, error) + func PageCountFile(inFile string) (int, error) + func PageDims(rs io.ReadSeeker, conf *model.Configuration) ([]types.Dim, error) + func PageDimsFile(inFile string) ([]types.Dim, error) + func PagesForPageCollection(pageCount int, pageSelection []string) ([]int, error) + func PagesForPageRange(from, thru int) []int + func PagesForPageSelection(pageCount int, pageSelection []string, ensureAllforNone bool) (types.IntSet, error) + func ParsePageSelection(s string) ([]string, error) + func Poster(rs io.ReadSeeker, outDir, fileName string, selectedPages []string, ...) error + func PosterFile(inFile, outDir, outFile string, selectedPages []string, cut *model.Cut, ...) error + func ReadContext(rs io.ReadSeeker, conf *model.Configuration) (*model.Context, error) + func ReadContextFile(inFile string) (*model.Context, error) + func RemoveAnnotations(rs io.ReadSeeker, w io.Writer, selectedPages, idsAndTypes []string, ...) error + func RemoveAnnotationsAsIncrement(rws io.ReadWriteSeeker, selectedPages, idsAndTypes []string, objNrs []int, ...) error + func RemoveAnnotationsFile(inFile, outFile string, selectedPages, idsAndTypes []string, objNrs []int, ...) (err error) + func RemoveAttachments(rs io.ReadSeeker, w io.Writer, files []string, conf *model.Configuration) error + func RemoveAttachmentsFile(inFile, outFile string, files []string, conf *model.Configuration) (err error) + func RemoveBoxes(rs io.ReadSeeker, w io.Writer, selectedPages []string, ...) error + func RemoveBoxesFile(inFile, outFile string, selectedPages []string, pb *model.PageBoundaries, ...) error + func RemoveFormFields(rs io.ReadSeeker, w io.Writer, fieldIDsOrNames []string, ...) error + func RemoveFormFieldsFile(inFile, outFile string, fieldIDs []string, conf *model.Configuration) (err error) + func RemoveKeywords(rs io.ReadSeeker, w io.Writer, keywords []string, conf *model.Configuration) error + func RemoveKeywordsFile(inFile, outFile string, keywords []string, conf *model.Configuration) (err error) + func RemovePages(rs io.ReadSeeker, w io.Writer, selectedPages []string, ...) error + func RemovePagesFile(inFile, outFile string, selectedPages []string, conf *model.Configuration) (err error) + func RemoveProperties(rs io.ReadSeeker, w io.Writer, properties []string, conf *model.Configuration) error + func RemovePropertiesFile(inFile, outFile string, properties []string, conf *model.Configuration) (err error) + func RemoveWatermarks(rs io.ReadSeeker, w io.Writer, selectedPages []string, ...) error + func RemoveWatermarksFile(inFile, outFile string, selectedPages []string, conf *model.Configuration) (err error) + func ResetFormFields(rs io.ReadSeeker, w io.Writer, fieldIDsOrNames []string, ...) error + func ResetFormFieldsFile(inFile, outFile string, fieldIDsOrNames []string, conf *model.Configuration) (err error) + func Resize(rs io.ReadSeeker, w io.Writer, selectedPages []string, resize *model.Resize, ...) error + func ResizeFile(inFile, outFile string, selectedPages []string, resize *model.Resize, ...) error + func Rotate(rs io.ReadSeeker, w io.Writer, rotation int, selectedPages []string, ...) error + func RotateFile(inFile, outFile string, rotation int, selectedPages []string, ...) (err error) + func SetPermissions(rs io.ReadSeeker, w io.Writer, conf *model.Configuration) error + func SetPermissionsFile(inFile, outFile string, conf *model.Configuration) (err error) + func Split(rs io.ReadSeeker, outDir, fileName string, span int, conf *model.Configuration) error + func SplitFile(inFile, outDir string, span int, conf *model.Configuration) error + func TextWatermark(text, desc string, onTop, update bool, u types.DisplayUnit) (*model.Watermark, error) + func Trim(rs io.ReadSeeker, w io.Writer, selectedPages []string, ...) error + func TrimFile(inFile, outFile string, selectedPages []string, conf *model.Configuration) (err error) + func UnlockFormFields(rs io.ReadSeeker, w io.Writer, fieldIDsOrNames []string, ...) error + func UnlockFormFieldsFile(inFile, outFile string, fieldIDsOrNames []string, conf *model.Configuration) (err error) + func UpdateImageWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, ...) error + func UpdatePDFWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, ...) error + func UpdateTextWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, text, desc string, ...) error + func Validate(rs io.ReadSeeker, conf *model.Configuration) error + func ValidateContext(ctx *model.Context) error + func ValidateFile(inFile string, conf *model.Configuration) error + func ValidateFiles(inFiles []string, conf *model.Configuration) error + func WatermarkContext(ctx *model.Context, selectedPages types.IntSet, wm *model.Watermark) error + func WriteContext(ctx *model.Context, w io.Writer) error + func WriteContextFile(ctx *model.Context, outFile string) error + func WriteIncrement(ctx *model.Context, w io.Writer) error + type PageSpan struct + From int + Reader io.Reader + Thru int + func SplitRaw(rs io.ReadSeeker, span int, conf *model.Configuration) ([]*PageSpan, error)