created a PoC for the client

This commit is contained in:
Saud Fatayerji
2023-10-26 23:41:48 +03:00
parent 13c4f664c2
commit 6d505715e0
16 changed files with 168 additions and 90 deletions

View File

@@ -1,10 +1,10 @@
import PDFLib from 'pdf-lib';
import { PDFDocument } from 'pdf-lib';
import { createSubDocument } from "./extractPages.js";
export async function splitPDF(snapshot, splitAfterPageArray) {
const pdfDoc = await PDFLib.PDFDocument.load(snapshot)
const pdfDoc = await PDFDocument.load(snapshot)
const numberOfPages = pdfDoc.getPages().length;