Intro Note:
- This answer covers the issue of rewards; what: how do we convert multiple files to 1 tiff? For example, let's say there is PDF, JPEG, PNG, and I would like to create 1 TIFF of them?
- In this answer, I use the .net implementation of https://imagemagick.org/index.php for working with images and Ghostscript to help read the AI / EPS / PDF / PS file so that we can translate it into image files that are valid and official sources.
- After I answered this question, in my email I received an additional question with other merge options, so I expanded my answer.
IMO there are 2 steps to your goal:
- Install the necessary tools to convert to PDF
- Take all images, including PDF files, from the source and combine them into a single TIFF file.
1. Install tools to help convert Pdf to image:
Step 1 is only required if you are going to convert AI / EPS / PDF / PS file formats. Otherwise, just go to step 2.
To make it possible to convert PDF to any image format, we need a library that can read PDF files, and we need a tool to convert it to an image type. To do this, we need to install Ghostscript (GNU Affero General Public License).
After that, we need to install ImageMagick.net for .net in Visual Studio, the nua link .
So far so good.
2. Code part
The second and final step - we need to read the files (png, jpg, bmp, pdf, etc.) from the folder and add each file to the MagickImageCollection , then we have several options for merging, use AppendHorizontally , AppendVertically , Montage or multi-page tiff. ImageMagick has many functions, such as resizing, resolution, etc., This is just an example that demonstrates the combination of functions:
public static void MergeImage(string src, string dest, MergeType type = MergeType.MultiplePage) { var files = new DirectoryInfo(src).GetFiles(); using (var images = new MagickImageCollection()) { foreach (var file in files) { var image = new MagickImage(file) { Format = MagickFormat.Tif, Depth = 8, }; images.Add(image); } switch (type) { case MergeType.Vertical: using (var result = images.AppendVertically()) { result.AdaptiveResize(new MagickGeometry(){Height = 600, Width = 800}); result.Write(dest); } break; case MergeType.Horizontal: using (var result = images.AppendHorizontally()) { result.AdaptiveResize(new MagickGeometry(){Height = 600, Width = 800}); result.Write(dest); } break; case MergeType.Montage: var settings = new MontageSettings { BackgroundColor = new MagickColor("#FFF"), Geometry = new MagickGeometry("1x1<") }; using (var result = images.Montage(settings)) { result.Write(dest); } break; case MergeType.MultiplePage: images.Write(dest); break; default: throw new ArgumentOutOfRangeException(nameof(type), type, "Un-support choice"); } images.Dispose(); } } public enum MergeType { MultiplePage, Vertical, Horizontal, Montage }
To run the code
public static void Main(string[] args) { var src = @"C:\temp\Images"; var dest1 = @"C:\temp\Output\MultiplePage.tiff"; var dest2 = @"C:\temp\Output\Vertical.tiff"; var dest3 = @"C:\temp\Output\Horizontal.tiff"; var dest4 = @"C:\temp\Output\Montage.tiff"; MergeImage(src, dest1); MergeImage(src, dest2, MergeType.Vertical); MergeImage(src, dest3, MergeType.Horizontal); MergeImage(src, dest4, MergeType.Montage); }
Here are 4 input files in C: \ temp \ Images:

After running the code, we get 4 new files in the folder C: \ temp \ Output, which look like this:
4-page multi-page Tiff
Vertical merge 4 images
Horizontal merge of 4 images
4 images of Montage Merge
Final note:
- You can combine multiple images using System.Drawing; and using System.Drawing.Imaging; without using ImageMagick, but pdf requires a third-party conversion library or tool, so I use Ghostscript and ImageMagick for C #.
- ImageMagick has many functions, so you can change the resolution, output file size, etc. This is a well-recognized library.
Disclaimer: Part of this answer is taken from my personal website https://itbackyard.com/how-to-convert-ai-eps-pdf-ps-to-image-file/ with github source code.