Image conversion issue - PDF file into TIFF Images

Hi Team,

We are facing issue while Conversion of attached PDF file into TIFF images in CCITT4 format, highlighted area is becoming dark (not readable).

Is there any solution for that with latest aspose version or by any property changes ?

Interest Spreadsheet.pdf (32.4 KB)

@midhunconduent
Please provide the code snippet you are using for conversion.

@sergei.shibanov

Thank you for the reply.

Please find the below code snippet we are using for conversion.

using (Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(FullInputFileName))
{
pdfDocument.Form.Type = Aspose.Pdf.Forms.FormType.Standard;
//create Resolution object
Resolution resolution = new Resolution(200);
//create TiffSettings object
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.Compression = CompressionType.CCITT4;
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format1bpp;
if (tiffSettings.Shape == ShapeType.Landscape)
tiffSettings.Shape = ShapeType.None;
tiffSettings.SkipBlankPages = false;
tiffSettings.Brightness = .80f;
Stream output = null;
sourceImages = new System.Drawing.Image[pdfDocument.Pages.Count];
//create TIFF device
TiffDevice tiffDevice = new TiffDevice(1700, 2200, resolution, tiffSettings);
for (int page = 1; page <= pdfDocument.Pages.Count; page++)
{
Aspose.Pdf.ColorType pageColorType = pdfDocument.Pages[page].ColorType;
if (pageColorType == ColorType.Rgb)
{
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format1bpp;
} else
{
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format1bpp;
} output = new MemoryStream();
tiffDevice.Process(pdfDocument,page,page,output);
sourceImages[page - 1] = System.Drawing.Image.FromStream(output);
sourceImages[page-1].Save(Path.Combine(OutputFolder, String.Concat(Path.GetFileNameWithoutExtension(FullInputFileName), “.”, page.ToString().PadLeft(3, ‘0’))));
} output = null;
tiffSettings = null;
pdfDocument.FreeMemory();
}

@midhunconduent
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-53742

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@sergei.shibanov

Thank you for the above update.

Could you please let us know if there any issue with our code ?

Could you please provide an update ?

@midhunconduent
I tested the code with the latest version of the library.
I did not see any obvious errors in the code, otherwise I would have reported.
You can try to select a number (in the provided fragment it is equal to 0.8) - perhaps this will give some effect.

@sergei.shibanov

Thank you for the above update.

Could you please clarify more ?

@midhunconduent
For now, that’s all I can write.
If I have more information, I’ll be sure to let you know.

1 Like