Hello,
We built an application to process PDF files and convert them to TIFF for storage in our Document Management System. The PDF files come from multiple sources, and we encountered an issue where the PDF would not convert to a TIFF correctly. On some occasions, if the PDF contains annotations, the annotation object will appear in a different location on the TIFF file.
This has been tested using Aspose.Pdf.Kit.dll, Version 5.8.0.0, as well as the latest version 6.0.0.0.
Here’s a sample code we used for the conversion:
private void ConvertPdfToTiff(string sourceFileNameIncludingPath, string destinationFileNameIncludingPath)
{
string compressionTypeName = Enum.GetName(typeof(TiffCompressionType), tiffSettings.CompressionType);
compressionTypeName = compressionTypeName.Remove(0, "Compression".Length);
CompressionType compressionType = (CompressionType)Enum.Parse(typeof(CompressionType), compressionTypeName, true);
PdfConverter pdfConverter = new PdfConverter();
try
{
pdfConverter.BindPdf(sourceFileNameIncludingPath);
pdfConverter.Resolution = tiffSettings.Resolution;
pdfConverter.SaveAsTIFF(destinationFileNameIncludingPath, tiffSettings.Resolution, tiffSettings.Resolution, compressionType);
}
finally
{
pdfConverter.Close();
}
}
I have attached two files to this thread:
- Sample.pdf: the source PDF
- Sample.tiff: the output of the SaveAsTIFF call
You can see in these 2 files an illustration of the issue we’re facing.
Please advise.
Thanks,
Jm