mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2024-12-21 19:08:24 +01:00
8 lines
349 B
JavaScript
8 lines
349 B
JavaScript
import { createSubDocument } from "./shared/createSubDocument.js";
|
|
|
|
export async function extractPages(snapshot, pagesToExtractArray, PDFLib) {
|
|
const pdfDoc = await PDFLib.PDFDocument.load(snapshot)
|
|
|
|
// TODO: invent a better format for pagesToExtractArray and convert it.
|
|
return createSubDocument(pdfDoc, pagesToExtractArray, PDFLib);
|
|
}; |