Documentation ¶
Overview ¶
Package cli provides pdfcpu command line processing.
Package cli provides pdfcpu command line processing.
Index ¶
- func AddAttachments(cmd *Command) ([]string, error)
- func AddBoxes(cmd *Command) ([]string, error)
- func AddKeywords(cmd *Command) ([]string, error)
- func AddProperties(cmd *Command) ([]string, error)
- func AddWatermarks(cmd *Command) ([]string, error)
- func Booklet(cmd *Command) ([]string, error)
- func ChangeOwnerPassword(cmd *Command) ([]string, error)
- func ChangeUserPassword(cmd *Command) ([]string, error)
- func Collect(cmd *Command) ([]string, error)
- func Create(cmd *Command) ([]string, error)
- func CreateCheatSheetsFonts(cmd *Command) ([]string, error)
- func Crop(cmd *Command) ([]string, error)
- func Cut(cmd *Command) ([]string, error)
- func Decrypt(cmd *Command) ([]string, error)
- func Dump(cmd *Command) ([]string, error)
- func Encrypt(cmd *Command) ([]string, error)
- func ExportBookmarks(cmd *Command) ([]string, error)
- func ExportFormFields(cmd *Command) ([]string, error)
- func ExtractAttachments(cmd *Command) ([]string, error)
- func ExtractContent(cmd *Command) ([]string, error)
- func ExtractFonts(cmd *Command) ([]string, error)
- func ExtractImages(cmd *Command) ([]string, error)
- func ExtractMetadata(cmd *Command) ([]string, error)
- func ExtractPages(cmd *Command) ([]string, error)
- func FillFormFields(cmd *Command) ([]string, error)
- func ImportBookmarks(cmd *Command) ([]string, error)
- func ImportImages(cmd *Command) ([]string, error)
- func InsertPages(cmd *Command) ([]string, error)
- func InstallFonts(cmd *Command) ([]string, error)
- func ListAnnotations(cmd *Command) ([]string, error)
- func ListAnnotationsFile(inFile string, selectedPages []string, conf *model.Configuration) (int, []string, error)
- func ListAttachments(cmd *Command) ([]string, error)
- func ListAttachmentsCompactFile(inFile string, conf *model.Configuration) ([]string, error)
- func ListAttachmentsFile(inFile string, conf *model.Configuration) ([]string, error)
- func ListBookmarks(cmd *Command) ([]string, error)
- func ListBookmarksFile(inFile string, conf *model.Configuration) ([]string, error)
- func ListBoxes(cmd *Command) ([]string, error)
- func ListBoxesFile(inFile string, selectedPages []string, pb *model.PageBoundaries, ...) ([]string, error)
- func ListFonts(cmd *Command) ([]string, error)
- func ListFormFields(cmd *Command) ([]string, error)
- func ListFormFieldsFile(inFiles []string, conf *model.Configuration) ([]string, error)
- func ListImages(cmd *Command) ([]string, error)
- func ListImagesFile(inFiles []string, selectedPages []string, conf *model.Configuration) ([]string, error)
- func ListInfo(cmd *Command) ([]string, error)
- func ListInfoFile(inFile string, selectedPages []string, conf *model.Configuration) ([]string, error)
- func ListInfoFiles(inFiles []string, selectedPages []string, json bool, conf *model.Configuration) ([]string, error)
- func ListKeywords(cmd *Command) ([]string, error)
- func ListKeywordsFile(inFile string, conf *model.Configuration) ([]string, error)
- func ListPageLayout(cmd *Command) ([]string, error)
- func ListPageMode(cmd *Command) ([]string, error)
- func ListPermissions(cmd *Command) ([]string, error)
- func ListPermissionsFile(inFiles []string, conf *model.Configuration) ([]string, error)
- func ListProperties(cmd *Command) ([]string, error)
- func ListPropertiesFile(inFile string, conf *model.Configuration) ([]string, error)
- func ListViewerPreferences(cmd *Command) ([]string, error)
- func LockFormFields(cmd *Command) ([]string, error)
- func MergeAppend(cmd *Command) ([]string, error)
- func MergeCreate(cmd *Command) ([]string, error)
- func MergeCreateZip(cmd *Command) ([]string, error)
- func MultiFillFormFields(cmd *Command) ([]string, error)
- func NDown(cmd *Command) ([]string, error)
- func NUp(cmd *Command) ([]string, error)
- func Optimize(cmd *Command) ([]string, error)
- func Poster(cmd *Command) ([]string, error)
- func Process(cmd *Command) (out []string, err error)
- func RemoveAnnotations(cmd *Command) ([]string, error)
- func RemoveAttachments(cmd *Command) ([]string, error)
- func RemoveBookmarks(cmd *Command) ([]string, error)
- func RemoveBoxes(cmd *Command) ([]string, error)
- func RemoveFormFields(cmd *Command) ([]string, error)
- func RemoveKeywords(cmd *Command) ([]string, error)
- func RemovePages(cmd *Command) ([]string, error)
- func RemoveProperties(cmd *Command) ([]string, error)
- func RemoveWatermarks(cmd *Command) ([]string, error)
- func ResetFormFields(cmd *Command) ([]string, error)
- func ResetPageLayout(cmd *Command) ([]string, error)
- func ResetPageMode(cmd *Command) ([]string, error)
- func ResetViewerPreferences(cmd *Command) ([]string, error)
- func Resize(cmd *Command) ([]string, error)
- func Rotate(cmd *Command) ([]string, error)
- func SetPageLayout(cmd *Command) ([]string, error)
- func SetPageMode(cmd *Command) ([]string, error)
- func SetPermissions(cmd *Command) ([]string, error)
- func SetViewerPreferences(cmd *Command) ([]string, error)
- func Split(cmd *Command) ([]string, error)
- func SplitByPageNr(cmd *Command) ([]string, error)
- func Trim(cmd *Command) ([]string, error)
- func UnlockFormFields(cmd *Command) ([]string, error)
- func Validate(cmd *Command) ([]string, error)
- func Zoom(cmd *Command) ([]string, error)
- type Command
- func AddAttachmentsCommand(inFile, outFile string, fileNames []string, conf *model.Configuration) *Command
- func AddAttachmentsPortfolioCommand(inFile, outFile string, fileNames []string, conf *model.Configuration) *Command
- func AddBoxesCommand(inFile, outFile string, pageSelection []string, pb *model.PageBoundaries, ...) *Command
- func AddKeywordsCommand(inFile, outFile string, keywords []string, conf *model.Configuration) *Command
- func AddPropertiesCommand(inFile, outFile string, properties map[string]string, ...) *Command
- func AddWatermarksCommand(inFile, outFile string, pageSelection []string, wm *model.Watermark, ...) *Command
- func BookletCommand(inFiles []string, outFile string, pageSelection []string, nup *model.NUp, ...) *Command
- func ChangeOwnerPWCommand(inFile, outFile string, pwOld, pwNew *string, conf *model.Configuration) *Command
- func ChangeUserPWCommand(inFile, outFile string, pwOld, pwNew *string, conf *model.Configuration) *Command
- func CollectCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration) *Command
- func CreateCheatSheetsFontsCommand(fontFiles []string, conf *model.Configuration) *Command
- func CreateCommand(inFilePDF, inFileJSON, outFilePDF string, conf *model.Configuration) *Command
- func CropCommand(inFile, outFile string, pageSelection []string, box *model.Box, ...) *Command
- func CutCommand(inFile, outDir, outFile string, pageSelection []string, cut *model.Cut, ...) *Command
- func DecryptCommand(inFile, outFile string, conf *model.Configuration) *Command
- func DumpCommand(inFilePDF string, vals []int, conf *model.Configuration) *Command
- func EncryptCommand(inFile, outFile string, conf *model.Configuration) *Command
- func ExportBookmarksCommand(inFile, outFileJSON string, conf *model.Configuration) *Command
- func ExportFormCommand(inFilePDF, outFileJSON string, conf *model.Configuration) *Command
- func ExtractAttachmentsCommand(inFile string, outDir string, fileNames []string, conf *model.Configuration) *Command
- func ExtractContentCommand(inFile string, outDir string, pageSelection []string, ...) *Command
- func ExtractFontsCommand(inFile string, outDir string, pageSelection []string, ...) *Command
- func ExtractImagesCommand(inFile string, outDir string, pageSelection []string, ...) *Command
- func ExtractMetadataCommand(inFile string, outDir string, conf *model.Configuration) *Command
- func ExtractPagesCommand(inFile string, outDir string, pageSelection []string, ...) *Command
- func FillFormCommand(inFilePDF, inFileJSON, outFilePDF string, conf *model.Configuration) *Command
- func ImportBookmarksCommand(inFile, inFileJSON, outFile string, replace bool, conf *model.Configuration) *Command
- func ImportImagesCommand(imageFiles []string, outFile string, imp *pdfcpu.Import, ...) *Command
- func InfoCommand(inFiles []string, pageSelection []string, json bool, conf *model.Configuration) *Command
- func InsertPagesCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration, ...) *Command
- func InstallFontsCommand(fontFiles []string, conf *model.Configuration) *Command
- func ListAnnotationsCommand(inFile string, pageSelection []string, conf *model.Configuration) *Command
- func ListAttachmentsCommand(inFile string, conf *model.Configuration) *Command
- func ListBookmarksCommand(inFile string, conf *model.Configuration) *Command
- func ListBoxesCommand(inFile string, pageSelection []string, pb *model.PageBoundaries, ...) *Command
- func ListFontsCommand(conf *model.Configuration) *Command
- func ListFormFieldsCommand(inFiles []string, conf *model.Configuration) *Command
- func ListImagesCommand(inFiles []string, pageSelection []string, conf *model.Configuration) *Command
- func ListKeywordsCommand(inFile string, conf *model.Configuration) *Command
- func ListPageLayoutCommand(inFile string, conf *model.Configuration) *Command
- func ListPageModeCommand(inFile string, conf *model.Configuration) *Command
- func ListPermissionsCommand(inFiles []string, conf *model.Configuration) *Command
- func ListPropertiesCommand(inFile string, conf *model.Configuration) *Command
- func ListViewerPreferencesCommand(inFile string, all, json bool, conf *model.Configuration) *Command
- func LockFormCommand(inFile, outFile string, fieldIDs []string, conf *model.Configuration) *Command
- func MergeAppendCommand(inFiles []string, outFile string, dividerPage bool, conf *model.Configuration) *Command
- func MergeCreateCommand(inFiles []string, outFile string, dividerPage bool, conf *model.Configuration) *Command
- func MergeCreateZipCommand(inFiles []string, outFile string, conf *model.Configuration) *Command
- func MultiFillFormCommand(inFilePDF, inFileData, outDir, outFilePDF string, merge bool, ...) *Command
- func NDownCommand(inFile, outDir, outFile string, pageSelection []string, n int, cut *model.Cut, ...) *Command
- func NUpCommand(inFiles []string, outFile string, pageSelection []string, nUp *model.NUp, ...) *Command
- func OptimizeCommand(inFile, outFile string, conf *model.Configuration) *Command
- func PosterCommand(inFile, outDir, outFile string, pageSelection []string, cut *model.Cut, ...) *Command
- func RemoveAnnotationsCommand(inFile, outFile string, pageSelection []string, idsAndTypes []string, ...) *Command
- func RemoveAttachmentsCommand(inFile, outFile string, fileNames []string, conf *model.Configuration) *Command
- func RemoveBookmarksCommand(inFile, outFile string, conf *model.Configuration) *Command
- func RemoveBoxesCommand(inFile, outFile string, pageSelection []string, pb *model.PageBoundaries, ...) *Command
- func RemoveFormFieldsCommand(inFile, outFile string, fieldIDs []string, conf *model.Configuration) *Command
- func RemoveKeywordsCommand(inFile, outFile string, keywords []string, conf *model.Configuration) *Command
- func RemovePagesCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration) *Command
- func RemovePropertiesCommand(inFile, outFile string, propKeys []string, conf *model.Configuration) *Command
- func RemoveWatermarksCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration) *Command
- func ResetFormCommand(inFile, outFile string, fieldIDs []string, conf *model.Configuration) *Command
- func ResetPageLayoutCommand(inFile, outFile string, conf *model.Configuration) *Command
- func ResetPageModeCommand(inFile, outFile string, conf *model.Configuration) *Command
- func ResetViewerPreferencesCommand(inFile, outFile string, conf *model.Configuration) *Command
- func ResizeCommand(inFile, outFile string, pageSelection []string, resize *model.Resize, ...) *Command
- func RotateCommand(inFile, outFile string, rotation int, pageSelection []string, ...) *Command
- func SetPageLayoutCommand(inFile, outFile, value string, conf *model.Configuration) *Command
- func SetPageModeCommand(inFile, outFile, value string, conf *model.Configuration) *Command
- func SetPermissionsCommand(inFile, outFile string, conf *model.Configuration) *Command
- func SetViewerPreferencesCommand(inFilePDF, inFileJSON, outFilePDF, stringJSON string, ...) *Command
- func SplitByPageNrCommand(inFile, dirNameOut string, pageNrs []int, conf *model.Configuration) *Command
- func SplitCommand(inFile, dirNameOut string, span int, conf *model.Configuration) *Command
- func TrimCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration) *Command
- func UnlockFormCommand(inFile, outFile string, fieldIDs []string, conf *model.Configuration) *Command
- func ValidateCommand(inFiles []string, conf *model.Configuration) *Command
- func ZoomCommand(inFile, outFile string, pageSelection []string, zoom *model.Zoom, ...) *Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAttachments ¶
AddAttachments embeds inFiles into a PDF context read from inFile and writes the result to outFile.
func AddBoxes ¶
AddBoxes adds page boundaries to inFile's page tree and writes the result to outFile.
func AddKeywords ¶
AddKeywords adds keywords to inFile's document info dict and writes the result to outFile.
func AddProperties ¶
AddProperties adds properties to inFile's document info dict and writes the result to outFile.
func AddWatermarks ¶
AddWatermarks adds watermarks or stamps to selected pages of inFile and writes the result to outFile.
func Booklet ¶
Booklet arranges selected PDF pages to outFile in an order and arrangement that form a small book.
func ChangeOwnerPassword ¶
ChangeOwnerPassword of inFile and write result to outFile.
func ChangeUserPassword ¶
ChangeUserPassword of inFile and write result to outFile.
func Collect ¶
Collect creates a custom page sequence for selected pages of inFile and writes result to outFile.
func Create ¶
Create renders page content corresponding to declarations found in inFileJSON and writes the result to outFile. If inFile is present, page content will be appended,
func CreateCheatSheetsFonts ¶
CreateCheatSheetsFonts creates single page PDF cheat sheets for user fonts in current dir.
func ExportBookmarks ¶
ExportBookmarks returns a representation of inFile's outlines as outFileJSON.
func ExportFormFields ¶
ExportFormFields returns a representation of inFile's form as outFileJSON.
func ExtractAttachments ¶
ExtractAttachments extracts inFiles from a PDF context read from inFile and writes the result to outFile.
func ExtractContent ¶
ExtractContent dumps "PDF source" files from inFile into outDir for selected pages.
func ExtractFonts ¶
ExtractFonts dumps embedded fontfiles from inFile into outDir for selected pages.
func ExtractImages ¶
ExtractImages dumps embedded image resources from inFile into outDir for selected pages.
func ExtractMetadata ¶
ExtractMetadata dumps all metadata dict entries for inFile into outDir.
func ExtractPages ¶
ExtractPages generates single page PDF files from inFile in outDir for selected pages.
func FillFormFields ¶
FillFormFields fills out inFile's form using data represented by inFileJSON.
func ImportBookmarks ¶
ImportBookmarks creates/replaces outlines of inFile corresponding to declarations found in inJSONFile and writes the result to outFile.
func ImportImages ¶
ImportImages 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.
func InsertPages ¶
InsertPages inserts a blank page before or after each selected page.
func InstallFonts ¶
InstallFonts installs True Type fonts into the pdfcpu pconfig dir.
func ListAnnotations ¶
ListAnnotations returns inFile's page annotations.
func ListAnnotationsFile ¶
func ListAnnotationsFile(inFile string, selectedPages []string, conf *model.Configuration) (int, []string, error)
ListAnnotationsFile returns a list of page annotations of inFile.
func ListAttachments ¶
ListAttachments returns a list of embedded file attachments for inFile.
func ListAttachmentsCompactFile ¶
func ListAttachmentsCompactFile(inFile string, conf *model.Configuration) ([]string, error)
ListAttachmentsCompactFile returns a list of embedded file attachments of inFile w/o optional description.
func ListAttachmentsFile ¶
func ListAttachmentsFile(inFile string, conf *model.Configuration) ([]string, error)
ListAttachmentsFile returns a list of embedded file attachments of inFile with optional description.
func ListBookmarks ¶
ListBookmarks returns inFile's outlines.
func ListBookmarksFile ¶
func ListBookmarksFile(inFile string, conf *model.Configuration) ([]string, error)
ListBookmarksFile returns the bookmarks of inFile.
func ListBoxesFile ¶
func ListBoxesFile(inFile string, selectedPages []string, pb *model.PageBoundaries, conf *model.Configuration) ([]string, error)
ListBoxesFile returns a list of page boundaries for selected pages of inFile.
func ListFonts ¶
ListFonts gathers information about supported fonts and returns the result as []string.
func ListFormFields ¶
ListFormFields returns inFile's form field ids.
func ListFormFieldsFile ¶
func ListFormFieldsFile(inFiles []string, conf *model.Configuration) ([]string, error)
ListFormFieldsFile returns a list of form field ids in inFile.
func ListImages ¶
ListImages returns inFiles embedded images.
func ListImagesFile ¶
func ListImagesFile(inFiles []string, selectedPages []string, conf *model.Configuration) ([]string, error)
ListImagesFile returns a formatted list of embedded images of inFile.
func ListInfoFile ¶
func ListInfoFile(inFile string, selectedPages []string, conf *model.Configuration) ([]string, error)
ListInfoFile returns formatted information about inFile.
func ListInfoFiles ¶
func ListInfoFiles(inFiles []string, selectedPages []string, json bool, conf *model.Configuration) ([]string, error)
ListInfoFiles returns formatted information about inFiles.
func ListKeywords ¶
ListKeywords returns a list of keywords for inFile.
func ListKeywordsFile ¶
func ListKeywordsFile(inFile string, conf *model.Configuration) ([]string, error)
ListKeywordsFile returns the keyword list of inFile.
func ListPageLayout ¶
ListPageLayout returns inFile's page layout.
func ListPageMode ¶
ListPageMode returns inFile's page mode.
func ListPermissions ¶
ListPermissions of inFile.
func ListPermissionsFile ¶
func ListPermissionsFile(inFiles []string, conf *model.Configuration) ([]string, error)
ListPermissionsFile returns a list of user access permissions for inFile.
func ListProperties ¶
ListProperties returns inFile's properties.
func ListPropertiesFile ¶
func ListPropertiesFile(inFile string, conf *model.Configuration) ([]string, error)
ListPropertiesFile returns the property list of inFile.
func ListViewerPreferences ¶
ListViewerPreferences returns inFile's viewer preferences.
func LockFormFields ¶
LockFormFields makes some or all form fields of inFile read-only.
func MergeAppend ¶
MergeAppend merges inFiles in the order specified and writes the result to outFile.
func MergeCreate ¶
MergeCreate merges inFiles in the order specified and writes the result to outFile.
func MergeCreateZip ¶
MergeCreateZip zips two inFiles in the order specified and writes the result to outFile.
func MultiFillFormFields ¶
MultiFillFormFields fills out multiple instances of inFile's form using JSON or CSV data.
func RemoveAnnotations ¶
RemoveAnnotations deletes annotations from inFile's page tree and writes the result to outFile.
func RemoveAttachments ¶
RemoveAttachments deletes inFiles from a PDF context read from inFile and writes the result to outFile.
func RemoveBookmarks ¶
RemoveBookmarks erases outlines of inFile.
func RemoveBoxes ¶
RemoveBoxes deletes page boundaries from inFile's page tree and writes the result to outFile.
func RemoveFormFields ¶
RemoveFormFields removes some form fields from inFile.
func RemoveKeywords ¶
RemoveKeywords deletes keywords from inFile's document info dict and writes the result to outFile.
func RemovePages ¶
RemovePages removes selected pages.
func RemoveProperties ¶
RemoveProperties deletes properties from inFile's document info dict and writes the result to outFile.
func RemoveWatermarks ¶
RemoveWatermarks remove watermarks or stamps from selected pages of inFile and writes the result to outFile.
func ResetFormFields ¶
ResetFormFields sets some or all form fields of inFile to the corresponding default value.
func ResetPageLayout ¶
ResetPageLayout resets inFile's page layout.
func ResetPageMode ¶
ResetPageMode resets inFile's page mode.
func ResetViewerPreferences ¶
ResetViewerPreferences resets inFile's viewer preferences.
func SetPageLayout ¶
SetPageLayout sets inFile's page layout.
func SetPageMode ¶
SetPageMode sets inFile's page mode.
func SetViewerPreferences ¶
SetViewerPreferences sets inFile's viewer preferences.
func SplitByPageNr ¶
Split inFile along pages and write result files to outDir.
func UnlockFormFields ¶
UnlockFormFields makes some or all form fields of inFile writeable.
Types ¶
type Command ¶
type Command struct { Mode model.CommandMode InFile *string InFileJSON *string InFiles []string InDir *string OutFile *string OutFileJSON *string OutDir *string PageSelection []string PWOld *string PWNew *string StringVal string IntVal int BoolVal1 bool BoolVal2 bool IntVals []int StringVals []string StringMap map[string]string Input io.ReadSeeker Inputs []io.ReadSeeker Output io.Writer Box *model.Box Import *pdfcpu.Import NUp *model.NUp Cut *model.Cut PageBoundaries *model.PageBoundaries Resize *model.Resize Zoom *model.Zoom Watermark *model.Watermark ViewerPreferences *model.ViewerPreferences Conf *model.Configuration }
Command represents an execution context.
func AddAttachmentsCommand ¶
func AddAttachmentsCommand(inFile, outFile string, fileNames []string, conf *model.Configuration) *Command
AddAttachmentsCommand creates a new command to add attachments.
func AddAttachmentsPortfolioCommand ¶
func AddAttachmentsPortfolioCommand(inFile, outFile string, fileNames []string, conf *model.Configuration) *Command
AddAttachmentsPortfolioCommand creates a new command to add attachments to a portfolio.
func AddBoxesCommand ¶
func AddBoxesCommand(inFile, outFile string, pageSelection []string, pb *model.PageBoundaries, conf *model.Configuration) *Command
AddBoxesCommand creates a new command to add page boundaries for selected pages.
func AddKeywordsCommand ¶
func AddKeywordsCommand(inFile, outFile string, keywords []string, conf *model.Configuration) *Command
AddKeywordsCommand creates a new command to add keywords.
func AddPropertiesCommand ¶
func AddPropertiesCommand(inFile, outFile string, properties map[string]string, conf *model.Configuration) *Command
AddPropertiesCommand creates a new command to add document properties.
func AddWatermarksCommand ¶
func AddWatermarksCommand(inFile, outFile string, pageSelection []string, wm *model.Watermark, conf *model.Configuration) *Command
AddWatermarksCommand creates a new command to add Watermarks to a file.
func BookletCommand ¶
func BookletCommand(inFiles []string, outFile string, pageSelection []string, nup *model.NUp, conf *model.Configuration) *Command
BookletCommand creates a new command to render PDFs or image files in booklet fashion.
func ChangeOwnerPWCommand ¶
func ChangeOwnerPWCommand(inFile, outFile string, pwOld, pwNew *string, conf *model.Configuration) *Command
ChangeOwnerPWCommand creates a new command to change the owner password.
func ChangeUserPWCommand ¶
func ChangeUserPWCommand(inFile, outFile string, pwOld, pwNew *string, conf *model.Configuration) *Command
ChangeUserPWCommand creates a new command to change the user password.
func CollectCommand ¶
func CollectCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration) *Command
CollectCommand creates a new command to create a custom PDF page sequence.
func CreateCheatSheetsFontsCommand ¶
func CreateCheatSheetsFontsCommand(fontFiles []string, conf *model.Configuration) *Command
CreateCheatSheetsFontsCommand creates single page PDF cheat sheets in current dir.
func CreateCommand ¶
func CreateCommand(inFilePDF, inFileJSON, outFilePDF string, conf *model.Configuration) *Command
CreateCommand creates a new command to create a PDF file.
func CropCommand ¶
func CropCommand(inFile, outFile string, pageSelection []string, box *model.Box, conf *model.Configuration) *Command
CropCommand creates a new command to apply a cropBox to selected pages.
func CutCommand ¶
func CutCommand(inFile, outDir, outFile string, pageSelection []string, cut *model.Cut, conf *model.Configuration) *Command
CutCommand creates a new command to cut and slice pages horizontally or vertically.
func DecryptCommand ¶
func DecryptCommand(inFile, outFile string, conf *model.Configuration) *Command
DecryptCommand creates a new command to decrypt a file.
func DumpCommand ¶
func DumpCommand(inFilePDF string, vals []int, conf *model.Configuration) *Command
DumpCommand creates a new command to dump objects on stdout.
func EncryptCommand ¶
func EncryptCommand(inFile, outFile string, conf *model.Configuration) *Command
EncryptCommand creates a new command to encrypt a file.
func ExportBookmarksCommand ¶
func ExportBookmarksCommand(inFile, outFileJSON string, conf *model.Configuration) *Command
ExportBookmarksCommand creates a new command to export bookmarks of inFile.
func ExportFormCommand ¶
func ExportFormCommand(inFilePDF, outFileJSON string, conf *model.Configuration) *Command
ExportFormCommand creates a new command to export a PDF form.
func ExtractAttachmentsCommand ¶
func ExtractAttachmentsCommand(inFile string, outDir string, fileNames []string, conf *model.Configuration) *Command
ExtractAttachmentsCommand creates a new command to extract attachments.
func ExtractContentCommand ¶
func ExtractContentCommand(inFile string, outDir string, pageSelection []string, conf *model.Configuration) *Command
ExtractContentCommand creates a new command to extract page content streams.
func ExtractFontsCommand ¶
func ExtractFontsCommand(inFile string, outDir string, pageSelection []string, conf *model.Configuration) *Command
ExtractFontsCommand creates a new command to extract embedded fonts. (experimental)
func ExtractImagesCommand ¶
func ExtractImagesCommand(inFile string, outDir string, pageSelection []string, conf *model.Configuration) *Command
ExtractImagesCommand creates a new command to extract embedded images. (experimental)
func ExtractMetadataCommand ¶
func ExtractMetadataCommand(inFile string, outDir string, conf *model.Configuration) *Command
ExtractMetadataCommand creates a new command to extract metadata streams.
func ExtractPagesCommand ¶
func ExtractPagesCommand(inFile string, outDir string, pageSelection []string, conf *model.Configuration) *Command
ExtractPagesCommand creates a new command to extract specific pages of a file.
func FillFormCommand ¶
func FillFormCommand(inFilePDF, inFileJSON, outFilePDF string, conf *model.Configuration) *Command
FillFormCommand creates a new command to fill a PDF form with data.
func ImportBookmarksCommand ¶
func ImportBookmarksCommand(inFile, inFileJSON, outFile string, replace bool, conf *model.Configuration) *Command
ImportBookmarksCommand creates a new command to import bookmarks to inFile.
func ImportImagesCommand ¶
func ImportImagesCommand(imageFiles []string, outFile string, imp *pdfcpu.Import, conf *model.Configuration) *Command
ImportImagesCommand creates a new command to import images.
func InfoCommand ¶
func InfoCommand(inFiles []string, pageSelection []string, json bool, conf *model.Configuration) *Command
InfoCommand creates a new command to output information about inFile.
func InsertPagesCommand ¶
func InsertPagesCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration, mode string) *Command
InsertPagesCommand creates a new command to insert a blank page before or after selected pages.
func InstallFontsCommand ¶
func InstallFontsCommand(fontFiles []string, conf *model.Configuration) *Command
InstallFontsCommand installs true type fonts for embedding.
func ListAnnotationsCommand ¶
func ListAnnotationsCommand(inFile string, pageSelection []string, conf *model.Configuration) *Command
ListAnnotationsCommand creates a new command to list annotations for selected pages.
func ListAttachmentsCommand ¶
func ListAttachmentsCommand(inFile string, conf *model.Configuration) *Command
ListAttachmentsCommand create a new command to list attachments.
func ListBookmarksCommand ¶
func ListBookmarksCommand(inFile string, conf *model.Configuration) *Command
ListBookmarksCommand creates a new command to list bookmarks of inFile.
func ListBoxesCommand ¶
func ListBoxesCommand(inFile string, pageSelection []string, pb *model.PageBoundaries, conf *model.Configuration) *Command
ListBoxesCommand creates a new command to list page boundaries for selected pages.
func ListFontsCommand ¶
func ListFontsCommand(conf *model.Configuration) *Command
ListFontsCommand returns a list of supported fonts.
func ListFormFieldsCommand ¶
func ListFormFieldsCommand(inFiles []string, conf *model.Configuration) *Command
ListFormFieldsCommand creates a new command to list the field ids from a PDF form.
func ListImagesCommand ¶
func ListImagesCommand(inFiles []string, pageSelection []string, conf *model.Configuration) *Command
ListImagesCommand creates a new command to list annotations for selected pages.
func ListKeywordsCommand ¶
func ListKeywordsCommand(inFile string, conf *model.Configuration) *Command
ListKeywordsCommand create a new command to list keywords.
func ListPageLayoutCommand ¶
func ListPageLayoutCommand(inFile string, conf *model.Configuration) *Command
ListPageLayoutCommand creates a new command to list the document page layout.
func ListPageModeCommand ¶
func ListPageModeCommand(inFile string, conf *model.Configuration) *Command
ListPageModeCommand creates a new command to list the document page mode.
func ListPermissionsCommand ¶
func ListPermissionsCommand(inFiles []string, conf *model.Configuration) *Command
ListPermissionsCommand create a new command to list permissions.
func ListPropertiesCommand ¶
func ListPropertiesCommand(inFile string, conf *model.Configuration) *Command
ListPropertiesCommand creates a new command to list document properties.
func ListViewerPreferencesCommand ¶
func ListViewerPreferencesCommand(inFile string, all, json bool, conf *model.Configuration) *Command
ListViewerPreferencesCommand creates a new command to list the viewer preferences.
func LockFormCommand ¶
func LockFormCommand(inFile, outFile string, fieldIDs []string, conf *model.Configuration) *Command
LockFormCommand creates a new command to lock PDF form fields.
func MergeAppendCommand ¶
func MergeAppendCommand(inFiles []string, outFile string, dividerPage bool, conf *model.Configuration) *Command
MergeAppendCommand creates a new command to merge files. Any existing outFile PDF content will be preserved and serves as the beginning of the merge result.
func MergeCreateCommand ¶
func MergeCreateCommand(inFiles []string, outFile string, dividerPage bool, conf *model.Configuration) *Command
MergeCreateCommand creates a new command to merge files. Outfile will be created. An existing outFile will be overwritten.
func MergeCreateZipCommand ¶
func MergeCreateZipCommand(inFiles []string, outFile string, conf *model.Configuration) *Command
MergeCreateZipCommand creates a new command to zip merge 2 files. Outfile will be created. An existing outFile will be overwritten.
func MultiFillFormCommand ¶
func MultiFillFormCommand(inFilePDF, inFileData, outDir, outFilePDF string, merge bool, conf *model.Configuration) *Command
MultiFillFormCommand creates a new command to fill multiple PDF forms with JSON or CSV data.
func NDownCommand ¶
func NDownCommand(inFile, outDir, outFile string, pageSelection []string, n int, cut *model.Cut, conf *model.Configuration) *Command
NDownCommand creates a new command to cut and slice pages horizontally or vertically.
func NUpCommand ¶
func NUpCommand(inFiles []string, outFile string, pageSelection []string, nUp *model.NUp, conf *model.Configuration) *Command
NUpCommand creates a new command to render PDFs or image files in n-up fashion.
func OptimizeCommand ¶
func OptimizeCommand(inFile, outFile string, conf *model.Configuration) *Command
OptimizeCommand creates a new command to optimize a file.
func PosterCommand ¶
func PosterCommand(inFile, outDir, outFile string, pageSelection []string, cut *model.Cut, conf *model.Configuration) *Command
PosterCommand creates a new command to cut and slice pages horizontally or vertically.
func RemoveAnnotationsCommand ¶
func RemoveAnnotationsCommand(inFile, outFile string, pageSelection []string, idsAndTypes []string, objNrs []int, conf *model.Configuration) *Command
RemoveAnnotationsCommand creates a new command to remove annotations for selected pages.
func RemoveAttachmentsCommand ¶
func RemoveAttachmentsCommand(inFile, outFile string, fileNames []string, conf *model.Configuration) *Command
RemoveAttachmentsCommand creates a new command to remove attachments.
func RemoveBookmarksCommand ¶
func RemoveBookmarksCommand(inFile, outFile string, conf *model.Configuration) *Command
RemoveBookmarksCommand creates a new command to remove all bookmarks from inFile.
func RemoveBoxesCommand ¶
func RemoveBoxesCommand(inFile, outFile string, pageSelection []string, pb *model.PageBoundaries, conf *model.Configuration) *Command
RemoveBoxesCommand creates a new command to remove page boundaries for selected pages.
func RemoveFormFieldsCommand ¶
func RemoveFormFieldsCommand(inFile, outFile string, fieldIDs []string, conf *model.Configuration) *Command
RemoveFormFieldsCommand creates a new command to remove fields from a PDF form.
func RemoveKeywordsCommand ¶
func RemoveKeywordsCommand(inFile, outFile string, keywords []string, conf *model.Configuration) *Command
RemoveKeywordsCommand creates a new command to remove keywords.
func RemovePagesCommand ¶
func RemovePagesCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration) *Command
RemovePagesCommand creates a new command to remove selected pages.
func RemovePropertiesCommand ¶
func RemovePropertiesCommand(inFile, outFile string, propKeys []string, conf *model.Configuration) *Command
RemovePropertiesCommand creates a new command to remove document properties.
func RemoveWatermarksCommand ¶
func RemoveWatermarksCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration) *Command
RemoveWatermarksCommand creates a new command to remove Watermarks from a file.
func ResetFormCommand ¶
func ResetFormCommand(inFile, outFile string, fieldIDs []string, conf *model.Configuration) *Command
ResetFormCommand creates a new command to lock PDF form fields.
func ResetPageLayoutCommand ¶
func ResetPageLayoutCommand(inFile, outFile string, conf *model.Configuration) *Command
ResetPageLayoutCommand creates a new command to reset the document page layout.
func ResetPageModeCommand ¶
func ResetPageModeCommand(inFile, outFile string, conf *model.Configuration) *Command
ResetPageModeCommand creates a new command to reset the document page mode.
func ResetViewerPreferencesCommand ¶
func ResetViewerPreferencesCommand(inFile, outFile string, conf *model.Configuration) *Command
ResetViewerPreferencesCommand creates a new command to reset the viewer preferences.
func ResizeCommand ¶
func ResizeCommand(inFile, outFile string, pageSelection []string, resize *model.Resize, conf *model.Configuration) *Command
ResizeCommand creates a new command to scale selected pages.
func RotateCommand ¶
func RotateCommand(inFile, outFile string, rotation int, pageSelection []string, conf *model.Configuration) *Command
RotateCommand creates a new command to rotate pages.
func SetPageLayoutCommand ¶
func SetPageLayoutCommand(inFile, outFile, value string, conf *model.Configuration) *Command
SetPageLayoutCommand creates a new command to set the document page layout.
func SetPageModeCommand ¶
func SetPageModeCommand(inFile, outFile, value string, conf *model.Configuration) *Command
SetPageModeCommand creates a new command to set the document page mode.
func SetPermissionsCommand ¶
func SetPermissionsCommand(inFile, outFile string, conf *model.Configuration) *Command
SetPermissionsCommand creates a new command to add permissions.
func SetViewerPreferencesCommand ¶
func SetViewerPreferencesCommand(inFilePDF, inFileJSON, outFilePDF, stringJSON string, conf *model.Configuration) *Command
SetViewerPreferencesCommand creates a new command to set the viewer preferences.
func SplitByPageNrCommand ¶
func SplitByPageNrCommand(inFile, dirNameOut string, pageNrs []int, conf *model.Configuration) *Command
SplitByPageNrCommand creates a new command to split a file into files along given pages.
func SplitCommand ¶
func SplitCommand(inFile, dirNameOut string, span int, conf *model.Configuration) *Command
SplitCommand creates a new command to split a file according to span or along bookmarks..
func TrimCommand ¶
func TrimCommand(inFile, outFile string, pageSelection []string, conf *model.Configuration) *Command
TrimCommand creates a new command to trim the pages of a file.
func UnlockFormCommand ¶
func UnlockFormCommand(inFile, outFile string, fieldIDs []string, conf *model.Configuration) *Command
UnlockFormCommand creates a new command to unlock PDF form fields.
func ValidateCommand ¶
func ValidateCommand(inFiles []string, conf *model.Configuration) *Command
ValidateCommand creates a new command to validate a file.
func ZoomCommand ¶
func ZoomCommand(inFile, outFile string, pageSelection []string, zoom *model.Zoom, conf *model.Configuration) *Command
ZoomCommand creates a new command to zoom in/out of selected pages.