We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Failure to convert PDF to TIF image using TIFF Device

Using the following code and latest version of Aspose.PDF_8.9.0 (downloaded today, 2/14/14) to convert PDF document pages to TIFF images results in blank image files with the attached file as input:



static void PdfToTiff(string oldName)

{

var newName = oldName.Replace(".pdf", “_pgnum.tif”);

var convPdfDocument = new Aspose.Pdf.Document(oldName);

var resolution = new Resolution(300);

var tiffSettings = new TiffSettings

{ Compression = CompressionType.CCITT4, Depth = ColorDepth.Default, Shape = ShapeType.None, SkipBlankPages = true };

var tiffDevice = new TiffDevice(resolution, tiffSettings);

var pgCount = convPdfDocument.Pages.Count;

for (var pg = 1; pg
{

var saveName = newName.Replace(“pgnum", "” + pg.ToString(“00”));

tiffDevice.Process(convPdfDocument, pg, pg, saveName);

}

convPdfDocument.Dispose();

}

Hi Elizabeth,


Thanks for contacting support.

I have tested the scenario using following code snippet in VisualStudio 2010 application running over Windows 7(x64) and I am unable to notice any issue. The PDF document is properly being converted to TIFF format using Aspose.Pdf for .NET 8.9.0. For your reference, I have also attached the resultant TIFF generated over my end.

[C#]

//open document<o:p></o:p>

Document pdfDocument = new Document("c:/pdftest/z201401140900127068+++Untitled+_00.pdf");

//create Resolution object

Resolution resolution = new Resolution(300);

//create TiffSettings object

TiffSettings tiffSettings = new TiffSettings();

tiffSettings.Compression = CompressionType.CCITT4;

tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Default;

tiffSettings.SkipBlankPages = false;

tiffSettings.Shape = ShapeType.None;

//create TIFF device

TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);

//convert a particular page and save the image to stream

tiffDevice.Process(pdfDocument, “c:/pdftest/z201401140900127068+++Untitled+_00_output.tif”);

My resultant images are empty though. Why are you getting images when I am not. I get images when I use the 8.3 version, but none since.



I also notice that instead of processing separate pages, you chose to modify the parameters and process the file in bulk. This is not acceptable. Process it the same way as I have and perhaps you will discover the problem the way I have.





Upon further investigation, I have discovered that there was another property that you arbitrarily changed from my initial property settings that was the problem. In my initial coding, I set the tiff setting property of SkipBlankPages to true, and in your example it is set to false. This unacceptable. If I cannot use the property as it is intended, then it is of no use to me. It needs to be corrected.

Hi Elizabeth,


Thanks for sharing the details.

I have again tested the scenario and have observed that when converting PDF to TIFF format (page by page), the resultant images are blank and the problem does not seem to be occurring when converting the PDF file to TIFF as a whole. For the sake of correction, I have logged this problem
as PDFNEWNET-36426 in our issue tracking system. We will further
look into the details of this problem and will keep you updated on the status
of correction. Please be patient and spare us little time. We are sorry for
this inconvenience.

I have found and I am attaching another file that failed to convert even though the tiff setting SkipBlankPages was set to false. This could be related to the same issue.

SuddathCoDeveloper:
I have found and I am attaching another file that failed to convert even though the tiff setting SkipBlankPages was set to false. This could be related to the same issue.
Hi Elizabeth,

Thanks for sharing the resource file.

I have tested the scenario using Aspose.Pdf for .NET 9.0.0 and as per my observations, System.ArgumentException is occurring while converting PDF file to TIFF format. For the sake of correction, I have separately logged this problem as PDFNEWNET-36534 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

The issues you have found earlier (filed as PDFNEWNET-36534;PDFNEWNET-36426) have been fixed in Aspose.Pdf for .NET 9.2.0.

The blog post for this release is created over this link


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.