{"modulePath":"github.com/hhrutter/pdfcpu","version":"v0.2.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cli\n\nPackage cli provides pdfcpu command line processing.\n\n## Functions\n\n```go\nfunc AddAttachments(cmd *Command) ([]string, error)\n```\nAddAttachments embeds inFiles into a PDF context read from inFile and writes the result to outFile.\n\n```go\nfunc AddWatermarks(cmd *Command) ([]string, error)\n```\nAddWatermarks adds watermarks or stamps to selected pages of inFile and writes the result to outFile.\n\n```go\nfunc ChangeOwnerPassword(cmd *Command) ([]string, error)\n```\nChangeOwnerPassword of inFile and write result to outFile.\n\n```go\nfunc ChangeUserPassword(cmd *Command) ([]string, error)\n```\nChangeUserPassword of inFile and write result to outFile.\n\n```go\nfunc Decrypt(cmd *Command) ([]string, error)\n```\nDecrypt inFile and write result to outFile.\n\n```go\nfunc Encrypt(cmd *Command) ([]string, error)\n```\nEncrypt inFile and write result to outFile.\n\n```go\nfunc ExtractAttachments(cmd *Command) ([]string, error)\n```\nExtractAttachments extracts inFiles from a PDF context read from inFile and writes the result to outFile.\n\n```go\nfunc ExtractContent(cmd *Command) ([]string, error)\n```\nExtractContent dumps \"PDF source\" files from inFile into outDir for selected pages.\n\n```go\nfunc ExtractFonts(cmd *Command) ([]string, error)\n```\nExtractFonts dumps embedded fontfiles from inFile into outDir for selected pages.\n\n```go\nfunc ExtractImages(cmd *Command) ([]string, error)\n```\nExtractImages dumps embedded image resources from inFile into outDir for selected pages.\n\n```go\nfunc ExtractMetadata(cmd *Command) ([]string, error)\n```\nExtractMetadata dumps all metadata dict entries for inFile into outDir.\n\n```go\nfunc ExtractPages(cmd *Command) ([]string, error)\n```\nExtractPages generates single page PDF files from inFile in outDir for selected pages.\n\n```go\nfunc ImportImages(cmd *Command) ([]string, error)\n```\nImportImages appends PDF pages containing images to outFile which will be created if necessary. ImportImages turns image files into a page sequence and writes the result to outFile. In its simplest form this operation converts an image into a PDF.\n\n```go\nfunc Info(cmd *Command) ([]string, error)\n```\nInfo gathers information about inFile and returns the result as \\[]string.\n\n```go\nfunc InsertPages(cmd *Command) ([]string, error)\n```\nInsertPages inserts a blank page before each selected page.\n\n```go\nfunc ListAttachments(cmd *Command) ([]string, error)\n```\nListAttachments returns a list of embedded file attachments for inFile.\n\n```go\nfunc ListPermissions(cmd *Command) ([]string, error)\n```\nListPermissions of inFile.\n\n```go\nfunc Merge(cmd *Command) ([]string, error)\n```\nMerge merges inFiles in the order specified and writes the result to outFile.\n\n```go\nfunc NUp(cmd *Command) ([]string, error)\n```\nNUp renders selected PDF pages or image files to outFile in n-up fashion.\n\n```go\nfunc Optimize(cmd *Command) ([]string, error)\n```\nOptimize inFile and write result to outFile.\n\n```go\nfunc Process(cmd *Command) (out []string, err error)\n```\nProcess executes a pdfcpu command.\n\n```go\nfunc RemoveAttachments(cmd *Command) ([]string, error)\n```\nRemoveAttachments deletes inFiles from a PDF context read from inFile and writes the result to outFile.\n\n```go\nfunc RemovePages(cmd *Command) ([]string, error)\n```\nRemovePages removes selected pages.\n\n```go\nfunc Rotate(cmd *Command) ([]string, error)\n```\nRotate rotates selected pages of inFile and writes result to outFile.\n\n```go\nfunc SetPermissions(cmd *Command) ([]string, error)\n```\nSetPermissions of inFile.\n\n```go\nfunc Split(cmd *Command) ([]string, error)\n```\nSplit inFile into single page PDFs and write result files to outDir.\n\n```go\nfunc Trim(cmd *Command) ([]string, error)\n```\nTrim inFile and write result to outFile.\n\n```go\nfunc Validate(cmd *Command) ([]string, error)\n```\nValidate inFile against ISO-32000-1:2008.\n\n## Types\n\n```go\ntype Command struct {\n\tMode          pdf.CommandMode    // VALIDATE  OPTIMIZE  SPLIT  MERGE  EXTRACT  TRIM  LISTATT ADDATT REMATT EXTATT  ENCRYPT  DECRYPT  CHANGEUPW  CHANGEOPW LISTP ADDP  WATERMARK  IMPORT  INSERTP REMOVEP ROTATE  NUP\n\tInFile        *string            //    *         *        *      -       *      *      *       *       *      *       *        *         *          *       *     *       *         -       *       *       *     -\n\tInFiles       []string           //    -         -        -      *       -      -      -       *       *      *       -        -         -          -       -     -       -         *       -       -       -     *\n\tInDir         *string            //    -         -        -      -       -      -      -       -       -      -       -        -         -          -       -     -       -         -       -       -       -     -\n\tOutFile       *string            //    -         *        -      *       -      *      -       -       -      -       *        *         *          *       -     -       *         *       *       *       -     *\n\tOutDir        *string            //    -         -        *      -       *      -      -       -       -      *       -        -         -          -       -     -       -         -       -       -       -     -\n\tPageSelection []string           //    -         -        -      -       *      *      -       -       -      -       -        -         -          -       -     -       *         -       *       *       -     *\n\tConf          *pdf.Configuration //    *         *        *      *       *      *      *       *       *      *       *        *         *          *       *     *       *         *       *       *       *     *\n\tPWOld         *string            //    -         -        -      -       -      -      -       -       -      -       -        -         *          *       -     -       -         -       -       -       -     -\n\tPWNew         *string            //    -         -        -      -       -      -      -       -       -      -       -        -         *          *       -     -       -         -       -       -       -     -\n\tWatermark     *pdf.Watermark     //    -         -        -      -       -      -      -       -       -      -       -        -         -          -       -     -       -         -       -       -       -     -\n\tSpan          int                //    -         -        *      -       -      -      -       -       -      -       -        -         -          -       -     -       -         -       -       -       -     -\n\tImport        *pdf.Import        //    -         -        -      -       -      -      -       -       -      -       -        -         -          -       -     -       -         *       -       -       -     -\n\tRotation      int                //    -         -        -      -       -      -      -       -       -      -       -        -         -          -       -     -       -         -       -       -       *     -\n\tNUp           *pdf.NUp           //    -         -        -      -       -      -      -       -       -      -       -        -         -          -       -     -       -         -       -       -       -     *\n\tInput         io.ReadSeeker\n\tInputs        []io.ReadSeeker\n\tOutput        io.Writer\n}\n```\nCommand represents an execution context.\n\n```go\nfunc AddAttachmentsCommand(inFile, outFile string, fileNames []string, conf *pdf.Configuration) *Command\n```\nAddAttachmentsCommand creates a new command to add attachments.\n\n```go\nfunc AddWatermarksCommand(inFile, outFile string, pageSelection []string, wm *pdf.Watermark, conf *pdf.Configuration) *Command\n```\nAddWatermarksCommand creates a new command to add Watermarks to a file.\n\n```go\nfunc ChangeOwnerPWCommand(inFile, outFile string, pwOld, pwNew *string, conf *pdf.Configuration) *Command\n```\nChangeOwnerPWCommand creates a new command to change the owner password.\n\n```go\nfunc ChangeUserPWCommand(inFile, outFile string, pwOld, pwNew *string, conf *pdf.Configuration) *Command\n```\nChangeUserPWCommand creates a new command to change the user password.\n\n```go\nfunc DecryptCommand(inFile, outFile string, conf *pdf.Configuration) *Command\n```\nDecryptCommand creates a new command to decrypt a file.\n\n```go\nfunc EncryptCommand(inFile, outFile string, conf *pdf.Configuration) *Command\n```\nEncryptCommand creates a new command to encrypt a file.\n\n```go\nfunc ExtractAttachmentsCommand(inFile string, outDir string, fileNames []string, conf *pdf.Configuration) *Command\n```\nExtractAttachmentsCommand creates a new command to extract attachments.\n\n```go\nfunc ExtractContentCommand(inFile string, outDir string, pageSelection []string, conf *pdf.Configuration) *Command\n```\nExtractContentCommand creates a new command to extract page content streams.\n\n```go\nfunc ExtractFontsCommand(inFile string, outDir string, pageSelection []string, conf *pdf.Configuration) *Command\n```\nExtractFontsCommand creates a new command to extract embedded fonts. (experimental)\n\n```go\nfunc ExtractImagesCommand(inFile string, outDir string, pageSelection []string, conf *pdf.Configuration) *Command\n```\nExtractImagesCommand creates a new command to extract embedded images. (experimental\n\n```go\nfunc ExtractMetadataCommand(inFile string, outDir string, conf *pdf.Configuration) *Command\n```\nExtractMetadataCommand creates a new command to extract metadata streams.\n\n```go\nfunc ExtractPagesCommand(inFile string, outDir string, pageSelection []string, conf *pdf.Configuration) *Command\n```\nExtractPagesCommand creates a new command to extract specific pages of a file.\n\n```go\nfunc ImportImagesCommand(imageFiles []string, outFile string, imp *pdf.Import, conf *pdf.Configuration) *Command\n```\nImportImagesCommand creates a new command to import images.\n\n```go\nfunc InfoCommand(inFile string, conf *pdf.Configuration) *Command\n```\nInfoCommand creates a new command to output information about inFile.\n\n```go\nfunc InsertPagesCommand(inFile, outFile string, pageSelection []string, conf *pdf.Configuration) *Command\n```\nInsertPagesCommand creates a new command to insert a blank page before selected pages.\n\n```go\nfunc ListAttachmentsCommand(inFile string, conf *pdf.Configuration) *Command\n```\nListAttachmentsCommand create a new command to list attachments.\n\n```go\nfunc ListPermissionsCommand(inFile string, conf *pdf.Configuration) *Command\n```\nListPermissionsCommand create a new command to list permissions.\n\n```go\nfunc MergeCommand(inFiles []string, outFile string, conf *pdf.Configuration) *Command\n```\nMergeCommand creates a new command to merge files.\n\n```go\nfunc NUpCommand(inFiles []string, outFile string, pageSelection []string, nUp *pdf.NUp, conf *pdf.Configuration) *Command\n```\nNUpCommand creates a new command to render PDFs or image files in n-up fashion.\n\n```go\nfunc OptimizeCommand(inFile, outFile string, conf *pdf.Configuration) *Command\n```\nOptimizeCommand creates a new command to optimize a file.\n\n```go\nfunc RemoveAttachmentsCommand(inFile, outFile string, fileNames []string, conf *pdf.Configuration) *Command\n```\nRemoveAttachmentsCommand creates a new command to remove attachments.\n\n```go\nfunc RemovePagesCommand(inFile, outFile string, pageSelection []string, conf *pdf.Configuration) *Command\n```\nRemovePagesCommand creates a new command to remove selected pages.\n\n```go\nfunc RotateCommand(inFile, outFile string, rotation int, pageSelection []string, conf *pdf.Configuration) *Command\n```\nRotateCommand creates a new command to rotate pages.\n\n```go\nfunc SetPermissionsCommand(inFile, outFile string, conf *pdf.Configuration) *Command\n```\nSetPermissionsCommand creates a new command to add permissions.\n\n```go\nfunc SplitCommand(inFile, dirNameOut string, span int, conf *pdf.Configuration) *Command\n```\nSplitCommand creates a new command to split a file into single page files.\n\n```go\nfunc TrimCommand(inFile, outFile string, pageSelection []string, conf *pdf.Configuration) *Command\n```\nTrimCommand creates a new command to trim the pages of a file.\n\n```go\nfunc ValidateCommand(inFile string, conf *pdf.Configuration) *Command\n```\nValidateCommand creates a new command to validate a file.\n\n","path":"github.com/hhrutter/pdfcpu/pkg/cli","name":"cli","synopsis":"Package cli provides pdfcpu command line processing.","isRedistributable":true}
