diff --git a/client-ionic/src/utils/pdf-operations.ts b/client-ionic/src/utils/pdf-operations.ts index 83716144..0751d88a 100644 --- a/client-ionic/src/utils/pdf-operations.ts +++ b/client-ionic/src/utils/pdf-operations.ts @@ -4,7 +4,6 @@ import { Metadata, editMetadata as dependantEditMetadata} from "@stirling-pdf/shared-operations/functions/editMetadata"; import { extractPages as dependantExtractPages } from "@stirling-pdf/shared-operations/functions/extractPages"; import { mergePDFs as dependantMergePDFs } from '@stirling-pdf/shared-operations/functions/mergePDFs'; -import { organizePages as dependantOrganizePages } from '@stirling-pdf/shared-operations/functions/organizePages'; import { rotatePages as dependantRotatePages } from '@stirling-pdf/shared-operations/functions/rotatePages'; import { scaleContent as dependantScaleContent} from '@stirling-pdf/shared-operations/functions/scaleContent'; import { scalePage as dependantScalePage } from '@stirling-pdf/shared-operations/functions/scalePage'; @@ -22,20 +21,6 @@ export async function mergePDFs(snapshots: (string | Uint8Array | ArrayBuffer)[] return dependantMergePDFs(snapshots); } -export async function organizePages( - snapshot: string | Uint8Array | ArrayBuffer, - operation: "CUSTOM_PAGE_ORDER" | - "REVERSE_ORDER" | - "DUPLEX_SORT" | - "BOOKLET_SORT" | - "ODD_EVEN_SPLIT" | - "REMOVE_FIRST" | - "REMOVE_LAST" | - "REMOVE_FIRST_AND_LAST", - customOrderString: string) { - return dependantOrganizePages(snapshot, operation, customOrderString); -} - export async function rotatePages(snapshot: string | Uint8Array | ArrayBuffer, rotation: number) { return dependantRotatePages(snapshot, rotation); } diff --git a/client-vanilla/public/exampleWorkflows.js b/client-vanilla/public/exampleWorkflows.js index 46c9f5c0..15cbefc1 100644 --- a/client-vanilla/public/exampleWorkflows.js +++ b/client-vanilla/public/exampleWorkflows.js @@ -104,7 +104,7 @@ export const splitOnly = { operations: [ { type: "split", - values: { "pagesToSplitAfterArray": [2, 10] }, + values: { "splitAfterPageArray": [2, 10] }, operations: [] } ] diff --git a/client-vanilla/public/functions.js b/client-vanilla/public/functions.js index 944ba702..be7bf914 100644 --- a/client-vanilla/public/functions.js +++ b/client-vanilla/public/functions.js @@ -14,7 +14,7 @@ import { scaleContent as dependantScaleContent} from './functions/scaleContent.j import { scalePage as dependantScalePage } from './functions/scalePage.js'; import { splitPDF as dependantSplitPDF } from './functions/splitPDF.js'; import { editMetadata as dependantEditMetadata} from "./functions/editMetadata.js"; -import { organizePages as dependantOrganizePages} from "./functions/organizePages.js"; +import { sortPagesWithPreset as dependantSortPagesWithPreset} from "./functions/organizePages.js"; import { removeBlankPages as dependantRemoveBlankPages} from "./functions/removeBlankPages.js"; import { splitOn as dependantSplitOn } from "./functions/splitOn.js"; @@ -52,8 +52,8 @@ export async function editMetadata(snapshot, metadata) { return dependantEditMetadata(snapshot, metadata, PDFLib); } -export async function organizePages(snapshot, operation, customOrderString) { - return dependantOrganizePages(snapshot, operation, customOrderString, PDFLib); +export async function sortPagesWithPreset(snapshot, operation, fancyPageSelector) { + return dependantSortPagesWithPreset(snapshot, operation, fancyPageSelector, PDFLib); } export async function removeBlankPages(snapshot, whiteThreashold) {