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

Free Support Forum - aspose.com

PDF file is converting to tiff as blank images

Hi,

I am using Aspose.pdf.dll v8.4.1.0

But i am not able to convert the attached pdf to tiff images.

Converted tiff image is showing as blank image.
Can you please help me?

Regards
Anish

Hi Anish,


Thanks
for using our products.
<o:p></o:p>

I
have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this problem as PDFNEWNET-36214 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.

Hi Nayyer Shahbaz,

I have one more doubt.
when i use the following code
PdfFileSecurity pf = new PdfFileSecurity(fInfo.FullName, decriptPath + ‘\’ + fInfo.Name);

I am showing a warning say:


Can you please let me know what is the reason?

Regards
Anish

Hi Anish,


Instead of providing Input and output file path information inside PdfFileSecurity constructor, please instantiate object without any argument and use BindPdf(…) method to load the source PDF file. Please take a look over following code lines.

[C#]

// Instantiate PdfFileSecurity object<o:p></o:p>

PdfFileSecurity pf = new PdfFileSecurity();

// bind the source PDF file

pf.BindPdf("input.pdf");

// save the updated PDF file

pdf1.Save(“updated.pdf”);

Hi,

Is there any update for the ticket PDFNEWNET-36214

Regards
Anish

Hi Anish,


Thanks for your inquiry. I am afraid the above reported issue is still not resolved, it is pending for investigation with other priority tasks. However, we have requested our development team to investigate it and share the ETA at their earliest. As soon as we get a feedback we will update you.

Thanks for your patience and cooperation.

Best Regards,

Hi,

I have one more pdf file which is not converting to tiff.

Please see the attached file.

Regards
Anish

Hi Anish,


Thanks for sharing the resource file.

I have tested the scenario using Aspose.Pdf for .NET 9.0.0 where I have used the following code snippet to convert PDF file to TIFF image and as per my observations, the resultant files are properly being generated. For your reference, I have also attached the resultant images generated over my end.

[C#]

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

Document pdfDocument = new Document(@"C:\pdftest\SKMBT_55214022516490.pdf");

int totalPages = pdfDocument.Pages.Count;

//create Resolution object

Resolution resolution = new Resolution(300);

//create TiffSettings object

TiffSettings tiffSettings = new TiffSettings();

tiffSettings.Compression = Aspose.Pdf.Devices.CompressionType.CCITT4;

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

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

// tiffSettings.Shape = ShapeType.Portait;

tiffSettings.SkipBlankPages = false;

//create TIFF device

TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);

for (int pageIndex = 1; pageIndex <= totalPages; pageIndex++)

{

//http://www.aspose.com/docs/display/pdfnet/Determine+page+color

Aspose.Pdf.ColorType pageColorType = pdfDocument.Pages[pageIndex].ColorType;

if (pageColorType == ColorType.Rgb)

{

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

}

else

{

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

}

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

string toTifFile = string.Format(@"C:\pdftest\SKMBT_55214022516490_{0}.tif", pageIndex);

tiffDevice.Process(pdfDocument, pageIndex, pageIndex, toTifFile);

}

pdfDocument.Dispose();

Hi Anish,


Thanks for your patience.

We recently have published Aspose.Pdf for .NET 9.1.0 and the problem is fixed in this release. Please continue using our API and in the event of any further query, please feel free to contact.