2023-11-10 21:08:07 +03:00
|
|
|
|
|
|
|
|
// Import injected libraries here!
|
|
|
|
|
|
2023-11-12 04:46:09 +03:00
|
|
|
import { sortPagesWithPreset, rearrangePages, selectPages, removePages, removeBlankPages } from "./functions/subDocumentFunctions";
|
2023-11-10 21:08:07 +03:00
|
|
|
import { impose } from "./functions/impose";
|
|
|
|
|
import { mergePDFs } from './functions/mergePDFs';
|
|
|
|
|
import { rotatePages } from './functions/rotatePages';
|
|
|
|
|
import { scaleContent} from './functions/scaleContent';
|
|
|
|
|
import { scalePage } from './functions/scalePage';
|
|
|
|
|
import { splitOn } from './functions/splitOn';
|
|
|
|
|
import { splitPDF } from './functions/splitPDF';
|
2023-11-11 18:35:33 +03:00
|
|
|
import { updateMetadata } from "./functions/updateMetadata";
|
2023-11-10 21:08:07 +03:00
|
|
|
|
2023-11-13 03:50:02 +03:00
|
|
|
const toExport = {
|
2023-11-12 04:46:09 +03:00
|
|
|
sortPagesWithPreset, rearrangePages, selectPages, removePages, removeBlankPages,
|
2023-11-10 21:08:07 +03:00
|
|
|
impose,
|
|
|
|
|
mergePDFs,
|
|
|
|
|
rotatePages,
|
|
|
|
|
scaleContent,
|
|
|
|
|
scalePage,
|
|
|
|
|
splitOn,
|
|
|
|
|
splitPDF,
|
2023-11-11 18:35:33 +03:00
|
|
|
updateMetadata,
|
2023-11-13 03:50:02 +03:00
|
|
|
}
|
|
|
|
|
export default toExport;
|
|
|
|
|
|
|
|
|
|
// Overide fields in the type of toExport, with the given fields and types. This seems to magically work!
|
|
|
|
|
// https://dev.to/vborodulin/ts-how-to-override-properties-with-type-intersection-554l
|
|
|
|
|
type Override<T1, T2> = Omit<T1, keyof T2> & T2;
|
|
|
|
|
export type OperationsUseages = Override<typeof toExport, {
|
|
|
|
|
impose: (snapshot: any, nup: number, format: string) => any;
|
|
|
|
|
}>;
|