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,
//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,
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.
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.