diff --git a/src/utils/images-to-pdf/images-to-pdf.ts b/src/utils/images-to-pdf/images-to-pdf.ts index 167b05cd..db5d8452 100644 --- a/src/utils/images-to-pdf/images-to-pdf.ts +++ b/src/utils/images-to-pdf/images-to-pdf.ts @@ -26,8 +26,9 @@ export async function imagesToPDF( const physicalWidth = width / dpi; const physicalHeight = height / dpi; const format = getImageFormat(blob); + const orientation = physicalWidth > physicalHeight ? "l" : "p"; - doc.addPage([physicalWidth, physicalHeight]); + doc.addPage([physicalWidth, physicalHeight], orientation); doc.addImage(buffer, format, 0, 0, physicalWidth, physicalHeight); }