Saltar al pie de página
USANDO IRONPDF

Cómo Combinar Imágenes en Un Solo PDF

This article will demonstrate how to use Adobe Acrobat Online and the IronPDF C# library to create a PDF document from multiple photos and save the newly created PDF file to the local file system. Follow the steps below:

Step 1

Open the Adobe Acrobat Online website.

How to Combine Images Into One PDF, Figure 1: Adobe Acrobat website
Adobe Acrobat website

Step 2

You will need to log in to this website. If you don't have an Adobe Account, you need to create one by clicking on the signup button. Once you have signed up, click on the login button and enter your credentials to log in to the Adobe Acrobat website.

Step 3

Once you log in, you will see the interface for Adobe Acrobat Online. There will be many options related to PDFs. Next, click on the "All tools" tab.

How to Combine Images Into One PDF, Figure 2: Navigate to Adobe Acrobat Online page
Navigate to Adobe Acrobat Online page

Step 4

After that, you will see the list of tools offered by Adobe Acrobat Online and select the "JPG to PDF" tool.

How to Combine Images Into One PDF, Figure 3: Navigate to JPG to PDF tool on the website
Navigate to JPG to PDF tool on the website

Step 5

This will now open a popup for the JPG-to-PDF tool. You will see the options to "Drag and Drop files" and "Add a file from your device". You will be able to drag and drop multiple pictures or select all the images from the device from either the same folder or a different folder.

How to Combine Images Into One PDF, Figure 4: Drag-and-drop file modal for JPG to PDF
Drag-and-drop file modal for JPG to PDF

After selecting all the photos, click on the continue button. This will merge multiple images into a single PDF file. The process will merge images without using third-party apps in a single document.

How to Combine Images Into One PDF, Figure 5: Adobe Acrobat processing through uploaded files
Adobe Acrobat processing through uploaded files

After conversion, you will see the output PDF in a tab. You can download the PDF to your system by clicking on the download tray button.

IronPDF: C# PDF Library

The IronPDF C# PDF library is a .NET library for reading, writing, and customizing PDF documents. The IronPDF C# library seeks to provide the most complete, accurate, and cross-platform source of information about PDFs. It offers a high-level API that is designed to be as intuitive as possible. The library provides access to the vast majority of features available in Adobe Acrobat, including those not provided free of charge.

The library provides methods and properties that enable you to read and write PDF files using just a few lines of code. You can convert PDFs between different versions, read text from PDFs and metadata from PDFs without extracting them, add pages to existing documents, insert images onto pages at various positions and scales, extract text from pages within documents, create a new PDF from an existing document, and more. The library also includes support for images of various bit depths and formats, including PNGs and convert multi-frame TIFFs to PDFs. You can use the library to create your own PDFs or work with other people's PDFs. The library also provides support for creating and manipulating bookmarks within PDFs, finding text within PDFs, extracting text from PDFs, extracting shapes from documents and adding them to new PDFs, splitting PDF documents into pages and merging them back together again.

This section will use the IronPDF library to create a PDF file using multiple images. Let's now examine the code example for doing this.

Code Example

// Install the IronPdf NuGet package using the command: PM> Install-Package IronPdf
using IronPdf;
using System.IO;
using System.Linq;

class Program
{
    static void Main()
    {
        // Get enumerable images from a specific folder.
        var ImageFiles = Directory.EnumerateFiles(@"C:\project\assets")
                                  .Where(f => f.EndsWith(".jpg") || f.EndsWith(".jpeg"));

        // Convert the images to a PDF and save it to the specified location.
        ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs(@"C:\project\composite.pdf");

        // Note: Use PdfDocument.RasterizeToImageFiles() method 
        // to flatten a PDF into images or thumbnails if needed.
    }
}
// Install the IronPdf NuGet package using the command: PM> Install-Package IronPdf
using IronPdf;
using System.IO;
using System.Linq;

class Program
{
    static void Main()
    {
        // Get enumerable images from a specific folder.
        var ImageFiles = Directory.EnumerateFiles(@"C:\project\assets")
                                  .Where(f => f.EndsWith(".jpg") || f.EndsWith(".jpeg"));

        // Convert the images to a PDF and save it to the specified location.
        ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs(@"C:\project\composite.pdf");

        // Note: Use PdfDocument.RasterizeToImageFiles() method 
        // to flatten a PDF into images or thumbnails if needed.
    }
}
' Install the IronPdf NuGet package using the command: PM> Install-Package IronPdf
Imports IronPdf
Imports System.IO
Imports System.Linq

Friend Class Program
	Shared Sub Main()
		' Get enumerable images from a specific folder.
		Dim ImageFiles = Directory.EnumerateFiles("C:\project\assets").Where(Function(f) f.EndsWith(".jpg") OrElse f.EndsWith(".jpeg"))

		' Convert the images to a PDF and save it to the specified location.
		ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs("C:\project\composite.pdf")

		' Note: Use PdfDocument.RasterizeToImageFiles() method 
		' to flatten a PDF into images or thumbnails if needed.
	End Sub
End Class
$vbLabelText   $csharpLabel

In the above code, it is very easy to convert multiple images to a PDF file with just a few lines of code. This is the power of IronPDF. You don't need to go online and log in to a website. Simply open the editor and write some code — and your PDF converter is ready to use. For more details, please visit the Image to PDF conversion examples.

Licensing

IronPDF is totally free for development purposes. However, at the production level, payment is required. IronPDF offers three plans. The Lite plan is for individual developers, and the professional plan is for individuals or teams that need powerful PDF software without any limitations. The unlimited plan is designed for large corporations and agencies that need an enterprise-level solution. All three plans are free of charge during the development, evaluation, or testing phases, but if you decide to use IronPDF in production, you'll need to pay the license fee. For new users, there is a free trial with no strings attached! You can also purchase five Iron Software products for the price of two. Visit IronPDF licensing details for more information.

Preguntas Frecuentes

¿Cómo puedo combinar múltiples imágenes en un solo PDF usando C#?

Puedes usar la clase ImageToPdfConverter de IronPDF para convertir múltiples imágenes en un solo PDF. Primero, instala el paquete NuGet de IronPDF, luego escribe un script en C# para listar tus archivos de imagen y usa el convertidor para crear y guardar el PDF.

¿Cuál es un método para convertir JPG a PDF sin usar herramientas en línea?

Usando IronPDF, puedes convertir imágenes JPG a PDF programáticamente, permitiéndote evitar las herramientas en línea y realizar conversiones directamente dentro de tu aplicación.

¿Es posible combinar imágenes en un PDF sin conexión a internet?

Sí, con IronPDF, puedes combinar imágenes en un PDF sin conexión usando su completa biblioteca C#, que proporciona funcionalidad para convertir y manipular documentos PDF sin necesidad de conectividad a internet.

¿IronPDF admite la conversión de varios formatos de imagen a PDF?

IronPDF admite la conversión de una amplia gama de formatos de imagen, incluyendo JPG, PNG y TIFF, a PDF, haciéndolo versátil para diferentes necesidades de conversión de imagen a PDF.

¿Cómo manejo las licencias para una biblioteca PDF?

IronPDF ofrece varias opciones de licencia: Lite para desarrolladores individuales, Professional para equipos y Unlimited para grandes corporaciones. La biblioteca es gratuita para desarrollo, pero se requiere una licencia para uso en producción.

¿Puedo extraer texto de un PDF usando una biblioteca de C#?

IronPDF proporciona métodos para extraer texto de documentos PDF, permitiendo a los desarrolladores acceder y manipular contenido de texto programáticamente.

¿Cuáles son las ventajas de usar una biblioteca de C# para la creación de PDF en comparación con los servicios en línea?

Usar IronPDF te permite automatizar los procesos de creación de PDF directamente dentro de tu aplicación, proporcionando mayor control, seguridad y flexibilidad en comparación con los servicios en línea que requieren acceso a internet y inicio de sesión en cuentas.

¿Cómo puedo probar una biblioteca PDF antes de comprar?

IronPDF ofrece una prueba gratuita que te permite evaluar sus características y capacidades antes de comprometerte a una compra, asegurándose de que cumple con tus requisitos específicos.

¿IronPDF se combina con .NET 10 para admitir la combinación de imágenes en archivos PDF?

Sí, IronPDF es totalmente compatible con .NET 10. Puede usar el mismo método ImageToPdfConverter en un proyecto .NET 10 para combinar imágenes en un PDF sin necesidad de configuración adicional ni soluciones alternativas. La compatibilidad multiplataforma de IronPDF incluye .NET 10 entre sus frameworks compatibles.

Curtis Chau
Escritor Técnico

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien ...

Leer más