Hello Aspose Team
We Faced Too many quality issues In Black & White Image Generation for products (Cell, Slide, Pdf). So Please provide a solution As a priority.
-
Cell
Consider Bellow Screes sort to understand the problem.
Excel.png (218.2 KB)
Sample Code
Aspose.Cells.License cellLicense = new Aspose.Cells.License();
cellLicense.SetLicense("Aspose.Total.NET.lic");
Workbook _workbook = new Workbook(new FileStream(@"Sub Process Batches.xlsx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
Aspose.Cells.Rendering.ImageOrPrintOptions options = new Aspose.Cells.Rendering.ImageOrPrintOptions();
options.HorizontalResolution = 300;
options.VerticalResolution = 300;
options.ImageType = Aspose.Cells.Drawing.ImageType.Tiff;
options.SetDesiredSize(2550, 3100);
options.PrintingPage = PrintingPageType.IgnoreBlank;
options.TiffBinarizationMethod = Aspose.Cells.Rendering.ImageBinarizationMethod.Threshold;
options.TiffCompression = Aspose.Cells.Rendering.TiffCompression.CompressionCCITT4;
for (int i = 0; i < _workbook.Worksheets.Count; i++)
{
SheetRender sr = new SheetRender(_workbook.Worksheets[i], options);
for (int j = 0; j < sr.PageCount; j++)
{
sr.ToImage(j, @"string.Format("_{0:" + "D6" + "}", i) + ".tiff");
}
}
Required Files: Cell Quality Issue.zip (1.4 MB)
-
Slide
Consider Bellow Screes sort to understand the problem.
Issue Explain.png (182.4 KB)
Sample Code
Aspose.Slides.License slidLicense = new Aspose.Slides.License();
slidLicense.SetLicense("Aspose.Total.NET.lic");
Presentation _document = new Presentation(new FileStream(@"Embedded Bluetooth.pptx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
Aspose.Slides.Export.TiffOptions options = new Aspose.Slides.Export.TiffOptions();
options.DpiX = 300;
options.DpiY = 300;
options.ImageSize = new System.Drawing.Size((int)(8.5 * 300), (int)(11 * 300));
options.CompressionType = Aspose.Slides.Export.TiffCompressionTypes.CCITT3;
options.ShowHiddenSlides = true;
_document.SlideSize.SetSize(SlideSizeType.Widescreen, SlideSizeScaleType.EnsureFit);
int[] slidIndex = new int[1];
for (int i = 0; i < _document.Slides.Count; i++)
{
slidIndex[0] = i + 1;
_document.Save(@"string.Format("_{0:" + "D6" + "}", i) + ".tiff"
, slidIndex, Aspose.Slides.Export.SaveFormat.Tiff, options);
}
Required Files: PPT Quality Issue.zip (968.4 KB)
-
PDF
Consider Bellow Screes sort to understand the problem.
Issue_1.jpg (247.4 KB)
Issue_2.png (321.3 KB)
Sample Code
Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense("Aspose.Total.NET.lic");
Aspose.Pdf.Document _document = new Aspose.Pdf.Document(new FileStream(@"GENERAL.pdf", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
TiffSettings options = new TiffSettings();
options.Compression = CompressionType.CCITT4;
Resolution resolutionObj = new Resolution(300);
TiffDevice tiffDevice = new TiffDevice(2550, 3100, resolutionObj, options);
for (int j = 1; j <= _document.Pages.Count; j++)
{
try
{
using (FileStream imageStream = new FileStream(@"string.Format("_{0:" + "D6" + "}", j) + ".tif", FileMode.Create))
{
tiffDevice.Process(_document, j, j, imageStream);
imageStream.Close();
}
}
catch (Exception ex)
{ }
}
Required Files: Pdf Quality Issue.zip (2.3 MB)
Note: we must require compression, resolution, and Size.