Imágenes a PDF To convert a single image to a PDF document, simply input the file path into the PdfGenerator.imageToPdf method and export the resulting PDF document. Converting multiple images to a PDF involves using an array of file paths. Below is the complete guide with a properly formatted code snippet. Code Explanation Import Required Modules: fs: A core Node.js module for interacting with the file system. path: A core module for handling and transforming file paths. PdfGenerator: A module from the IronPDF library used for generating PDFs. Read Directory: fs.readdir: Reads the directory specified by imageDirectoryPath. Filters and returns files that have .jpg or .jpeg extensions. Build Full File Paths: Uses path.join to construct the full paths of filtered image files. Convert Images to PDF: The PdfGenerator.imageToPdf method takes the array of image paths and converts them to a single PDF. Save the PDF: The saveAs method saves the generated PDF as composite.pdf. For more details on converting images to PDFs using IronPDF, visit the IronPDF product page. Explore Python PDF to Image Conversion Guide Enlaces de Documentos Ver en Github Tutorial Relacionado Guía de Cómo Hacer Relacionada Documentación de Clase Obtener Paquetes de Idiomas Descargar IronPDF DLL Reportar un problema en esta página ¿Listo para empezar? Versión: 2025.11 recién lanzado Instalación gratuita con npm Ver Licencias
Producto completamente funcional Obtén 30 días de producto completamente funcional.Instálalo y ejecútalo en minutos.
Soporte técnico 24/5 Acceso completo a nuestro equipo de soporte técnico durante tu prueba del producto