Merge TIFF to PDF in Java
High-speed and cross-platform Java library for merging TIFF to PDF files using Java code
Merge TIFF to PDF using Aspose.Slides
Aspose.Slides for Java is a powerful Java library used to create, convert, merge, and manipulate presentations, PDFs, images, and other files. When you merge TIFF to PDF, you are effectively combining images to obtain a single PDF file.
Merge TIFF to PDF in Java
Using Aspose.Slides for Java , you can merge TIFF to PDF quickly with just a few lines of code
Java code for merging TIFF to PDF
Presentation pres = new Presentation();
try {
IPPImage image1 = pres.getImages().addImage(Files.readAllBytes("image1.tif"));
pres.getSlides().get_Item(0).getShapes().addPictureFrame(ShapeType.Rectangle, 0, 0, 100, 100, image1);
IPPImage image2 = pres.getImages().addImage(Files.readAllBytes("image2.tif"));
pres.getSlides().get_Item(0).getShapes().addPictureFrame(ShapeType.Rectangle, 0, 200, 100, 100, image2);
pres.save("pres.pdf", SaveFormat.Pdf);
} finally {
if (pres != null) pres.dispose();
}
How to merge TIFF to PDF in Java
Install Aspose.Slides for Java. See Installation .
Add the library as a reference in your project.
Create an instance of the Presentation class.
Load the TIFF files you want to merge as picture frames.
Save the resulting PDF.
Merge PDF Files Online
Merge other files
You can also combine files in other formats to get a single file