Hello,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
We build an application to process PDF files and converts them to TIFF for storage in our Document Management System.
The PDF files come from multiple sources and we ran into an issue where the PDF would not convert to a TIFF correctly.
On some occasion, if the PDF contains annotations, the annotation object will appear on a different location on the TIFF file.
This has been tested using Aspose.Pdf.Kit.dll, Version 5.8.0.0 as the latest 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:
1. Sample.pdf: the source PDF
2. Sample.tiff: the output of the SaveAsTIFF call
You can see on these 2 files an illustration of the issue we're facing.
Please advise.
Thanks,
Jm