Multipage Tiff to PDF Code Help

Hello, we are attempting to use aspose imaging 23.8 to convert a multi page tiff to pdf. Upon reviewing the documentation, there are a lot of outdated examples using aspose.pdf in exclusivity. We would like to check that the image size does not exceed 12inches (in either width or height) and then convert to pdf using the tools available in aspose imaging. Could we please receive some help doing this, as it is difficult to navigate the functionality of the artifact in the decompiler.

Hello, @drymers,
Here is a code example checking if a TIFF image size fits some limit and saving it as a PDF:

var inputPath = @"input.tiff";
const int SizeLimitInch = 12;
using var image = Image.Load(inputPath) as TiffImage;
var widthInches = image.Width / image.HorizontalResolution;
var heightInches = image.Height / image.VerticalResolution;
if (widthInches <= SizeLimitInch && heightInches <= SizeLimitInch)
{
    var outputPath = Path.ChangeExtension(inputPath, ".pdf");
    image.Save(outputPath);
}