@bader-nasser/pdftools
Version:
PDF tools to manipulate and process PDF files
72 lines (71 loc) • 1.88 kB
TypeScript
import { BaseCommandWithCompression } from '../../base-command-with-compression.js';
export default class Process extends BaseCommandWithCompression {
static aliases: string[];
static description: string;
static examples: string[];
static args: {
file: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
};
static flags: {
keep: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
};
run(): Promise<void>;
}
type NumberOrString = number | string;
type InputFileObject = {
/**
* Name of input file.
*/
name: string;
/**
* Page ranges.
* See: https://github.com/bader-nasser/pdftools/blob/main/test/docs/data.txt
*/
pages: NumberOrString | NumberOrString[];
} | {
/**
* Name of input file.
*/
name: string;
/**
* A text file that contains page ranges.
* See: https://github.com/bader-nasser/pdftools/blob/main/test/docs/data.txt
*/
data: string;
};
export type Metadata = {
title?: string;
author?: string;
subject?: string;
keywords?: string[];
producer?: string;
/**
* @default 'pdftools (https://github.com/bader-nasser/pdftools)'
*/
creator?: string;
creationDate?: string;
modificationDate?: string;
};
export type JsonFileObject = Metadata & {
$schema?: string;
output: string;
/**
* An array of file entries that forms the output.
* The entry can be a simple string of file name or an object which specifies
* the file name with selected pages OR applied data file.
*/
files: Array<string | InputFileObject>;
/**
* Reduce file size
*/
compress?: boolean;
/**
* Pretend to work!
*/
dryRun?: boolean;
/**
* Work silently.
*/
silent?: boolean;
};
export {};