Hi,
I'm using Aspose.Pdf.Kit version 3.4.0 in .NET to convert pdf files to tiff images, which can be loaded later. It is working as expected in the development environment but in the production environment (Windows Server 2003 Terminal Services) I am getting the following error messages:
"Out of memory" if SaveAsTIFF(imageFilePath) is used
or
"Parameter is not valid" if SaveAsTIFF(outputStream) is used.
Here is my code:
// Using SaveAsTIFF(outputStream)
Aspose.Pdf.Kit.PdfConverter conv = new Aspose.Pdf.Kit.PdfConverter();
MemoryStream ms = new MemoryStream();
string filePath; //path to pdf file
conv.BindPdf(filePath);
conv.DoConvert();
conv.SaveAsTIFF(ms);
conv.Close();
Image image = Image.FromStream(ms); //this gives the "Parameter is not valid" error message
// using SaveAsTIFF(imageFilePath)
Aspose.Pdf.Kit.PdfConverter conv = new Aspose.Pdf.Kit.PdfConverter();
string filePath; //path to pdf file
string imageFilePath; //path to new image file
conv.BindPdf(filePath);
conv.DoConvert();
conv.SaveAsTIFF(imageFilePath);
conv.Close();
Image image = Image.FromFile(imageFilePath, false); //this gives the "Out of Memory" error message