mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2024-12-21 19:08:24 +01:00
48 lines
2.1 KiB
JavaScript
48 lines
2.1 KiB
JavaScript
// PDFLib gets importet via index.html script-tag
|
|
import * as pdfcpuWraopper from "./wasm/pdfcpu-wrapper-browser.js";
|
|
|
|
import { extractPages as dependantExtractPages } from "shared-operations/functions/extractPages.js";
|
|
import { impose as dependantImpose } from 'shared-operations/functions/impose.js';
|
|
import { mergePDFs as dependantMergePDFs } from 'shared-operations/functions/mergePDFs.js';
|
|
import { rotatePages as dependantRotatePages } from 'shared-operations/functions/rotatePages.js';
|
|
import { scaleContent as dependantScaleContent} from 'shared-operations/functions/scaleContent.js';
|
|
import { scalePage as dependantScalePage } from 'shared-operations/functions/scalePage.js';
|
|
import { splitPDF as dependantSplitPDF } from 'shared-operations/functions/splitPDF.js';
|
|
import { editMetadata as dependantEditMetadata} from "shared-operations/functions/editMetadata.js";
|
|
import { organizePages as dependantOrganizePages} from "shared-operations/functions/organizePages.js";
|
|
|
|
export async function extractPages(snapshot, pagesToExtractArray) {
|
|
return dependantExtractPages(snapshot, pagesToExtractArray, PDFLib);
|
|
}
|
|
|
|
export async function impose(snapshot, nup, format) {
|
|
return dependantImpose(snapshot, nup, format, pdfcpuWraopper);
|
|
}
|
|
|
|
export async function mergePDFs(snapshots) {
|
|
return dependantMergePDFs(snapshots, PDFLib);
|
|
}
|
|
|
|
export async function rotatePages(snapshot, rotation) {
|
|
return dependantRotatePages(snapshot, rotation, PDFLib);
|
|
}
|
|
|
|
export async function scaleContent(snapshot, scaleFactor) {
|
|
return dependantScaleContent(snapshot, scaleFactor, PDFLib);
|
|
}
|
|
|
|
export async function scalePage(snapshot, pageSize) {
|
|
return dependantScalePage(snapshot, pageSize, PDFLib);
|
|
}
|
|
|
|
export async function splitPDF(snapshot, splitAfterPageArray) {
|
|
return dependantSplitPDF(snapshot, splitAfterPageArray, PDFLib);
|
|
}
|
|
|
|
export async function editMetadata(snapshot, metadata) {
|
|
return dependantEditMetadata(snapshot, metadata, PDFLib);
|
|
}
|
|
|
|
export async function organizePages(snapshot, operation, customOrderString) {
|
|
return dependantOrganizePages(snapshot, operation, customOrderString, PDFLib);
|
|
} |