added 2 new root folders

This commit is contained in:
Saud Fatayerji
2023-10-23 18:08:28 +03:00
parent 31b746eb4b
commit 368d742d41
58 changed files with 10235 additions and 250 deletions

View File

@@ -0,0 +1,16 @@
export async function rotatePages (snapshot, rotation, PDFLib) {
// Load the original PDF file
const pdfDoc = await PDFLib.PDFDocument.load(snapshot, {
parseSpeed: PDFLib.ParseSpeeds.Fastest,
});
const pages = pdfDoc.getPages();
pages.forEach(page => {
// Change page size
page.setRotation(PDFLib.degrees(rotation))
});
// Serialize the modified document
return pdfDoc.save();
};