Hello,
I am trying to convert a .pdf file to .tiff and gettting errors on Linux CentOS version 7.
Here is a partial error trace -
Unhandled Exception: System.NotImplementedException: Not implemented.
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at #=z_DdlHhocZ9HZjb4zkXnLnAoglxmRp8DRlMAksz9K5$_oU6_pjA==.#=zKz0wqCU=(Bitmap #=zVXpQWws=)
at Aspose.Pdf.Devices.TiffDevice.Process(Document document, Int32 fromPage, Int32 toPage, Stream output)
Here is the function that causes this issue -
public void ConvertPdfToTiff(string sourcepath, string destinationParentDirectory, int resolutionSize)
{
var pdfDocument = new Aspose.Pdf.Document(sourcepath);
var outDirPath = destinationParentDirectory;
for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
{
var imageFileName = pageCount + ".tiff";
using (FileStream imageStream = new FileStream(Path.Combine(outDirPath, imageFileName), FileMode.Create))
{
var resolution = new Resolution(resolutionSize);
var tiffSettings = new TiffSettings
{
Compression = CompressionType.None,
Depth = ColorDepth.Format8bpp,
SkipBlankPages = false
};
var tiffDevice = new TiffDevice(resolution, tiffSettings);
//var tiffDevice = new TiffDevice();
// Convert a particular page and save the image to stream
tiffDevice.Process(pdfDocument, pageCount, pageCount, imageStream);
}
}
}
When Process() is called on tiffDeviceit crashes.
Note - this works fine on Windows.
Is Aspose supported on this platform and can you help with some links to get this working.