Free Support Forum - aspose.com

Clarity issue with converted Tiff document from PDF document

Hi,

We are converting pdf document into Tiff image by using Aspose.dll (Please refer below code for more information). We are facing an clarity issue with converted Tiff from PDF by using resolution as 75.

For using resolution as 75 and PDF of 10MB, we are getting Tiff image is of size 23MB.But we are facing clarity issue(blurry) on hand written document.

For using resolution as 100 and PDF of 10MB, we are getting Tiff image is of size 41MB.But still image is not clear(blurry) on hand written document.

For using resolution as 200 and PDF of 10MB, we are getting Tiff image is of size 166MB. Image are better compare to other less resolution, but Size of the document is getting incresed by 16 times of original PDF.

Please suggest us a solution, to get fine view images with less size. It would be a greatfull, if I get solution for this.

Here is the sample code which we are using.

Sample 1:

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(inputPath);

Aspose.Pdf.Devices.Resolution resolution = new Aspose.Pdf.Devices.Resolution(200);

PdfDevices.TiffSettings tiffSettings = new PdfDevices.TiffSettings();

tiffSettings.Compression = PdfDevices.CompressionType.None;

tiffSettings.Depth = PdfDevices.ColorDepth.Default;

tiffSettings.Shape = PdfDevices.ShapeType.None;

tiffSettings.SkipBlankPages = false;

// Create TIFF device

Aspose.Pdf.Devices.TiffDevice tiffDevice = new Aspose.Pdf.Devices.TiffDevice(resolution, tiffSettings);

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

tiffDevice.Process(pdfDocument, outputPath);

Sample 2:

Config:

<setting name="Resolution" serializeAs="String">

<value>300</value>

</setting>

<setting name="ColorDepth" serializeAs="String">

<value>Format1bpp</value>

</setting>

<setting name="Compression" serializeAs="String">

<value>CCITT4</value>

</setting>

Code:

converter.Resolution = new Aspose.Pdf.Devices.Resolution(Properties.Settings.Default.Resolution);

converter.BindPdf(inputPath);

converter.DoConvert();

PdfDevices.TiffSettings tiffSettings = new PdfDevices.TiffSettings();

tiffSettings.Depth = (PdfDevices.ColorDepth)Enum.Parse(typeof(PdfDevices.ColorDepth), Properties.Settings.Default.ColorDepth, true); //PdfDevices.ColorDepth.Format1bpp;

tiffSettings.Compression = (PdfDevices.CompressionType)Enum.Parse(typeof(PdfDevices.CompressionType), Properties.Settings.Default.Compression, true);

// use higher performance interface impl.

WinAPIIndexBitmapConverter bitmapConverter = new WinAPIIndexBitmapConverter();

converter.SaveAsTIFF(outputPath, tiffSettings, bitmapConverter);

converter.Close();

Hi Reethesh,


Thanks for your inquiry. We will appreciate it if you please share your sample document here as well. So we will look into it and provide your information accordingly.

We are sorry for the inconvenience caused.

Best Regards,

I have attached sample pdf document.

Hi Reethesh,


Thanks for sharing your source document. I have slightly changed your code, used CCITT4 compression, It has reduced output TIFF image size. Please check following code and attached output TIFF images with 150 and 200 resolution. Please check these and and confirm whether it will work for you?

Aspose.Pdf.Document
pdfDocument = new Aspose.Pdf.Document(“E:/data/SCAN-08052015-094244.pdf”);<o:p></o:p>

Aspose.Pdf.Devices.Resolution resolution = new Aspose.Pdf.Devices.Resolution(150);

TiffSettings tiffSettings = new TiffSettings();

tiffSettings.Compression = CompressionType.None;

tiffSettings.Depth = ColorDepth.Default;

tiffSettings.Compression = CompressionType.CCITT4;

tiffSettings.Shape = Aspose.Pdf.Devices.ShapeType.None;

tiffSettings.SkipBlankPages = false;

// Create TIFF device

Aspose.Pdf.Devices.TiffDevice tiffDevice = new Aspose.Pdf.Devices.TiffDevice(resolution, tiffSettings);

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

tiffDevice.Process(pdfDocument, "E:/data/SCAN-08052015-094244_150.tif");

Please feel free to contact us for any further assistance.


Best Regards,

Hi Tital,

Thanks for your suggestion.

As you suggested, we have used above configuration and tested for few documents. We are waiting for Business response on clarity issue. We will let you know once we get response.

Hi Reethesh,


Thanks for your feedback. Sure please confirm user’s feedback and If we can be of any further assistance, please feel free to contact us.

Best Regards,