Environment
- Aspose.PDF Version: 21.6.0
- Platform: .NET 3.0
- Operating System: Windows / Linux
- Conversion Type: PDF → TIFF (Color)
Issue Description
We are facing a critical issue while converting PDF documents to TIFF format using Aspose.PDF 21.6.0 .
During the conversion process, all pages in the final TIFF output are generated only in Black & White , even when the source PDF contains colored content and the conversion is explicitly intended to be Color TIFF .
Observed Behavior
Color TIFF Output Problem
- TIFF file is generated successfully without any exceptions.
- All pages in the TIFF output appear only in Black & White .
- Colored PDFs are also converted into B/W TIFF , losing all color information.
- Pages containing black or dark backgrounds are especially affected.
Expected Behavior
- When converting a PDF to TIFF in color mode , the output TIFF should preserve:
- Original colors
- Background shading
- Text and images exactly as in the source PDF
Actual Behavior
- Color information is completely lost.
- Output TIFF files are always generated in Black & White, regardless of the input PDF.
Sample Code Used (Representative):
using (var document = new Document(inputFilePath))
{
var resolution = new Resolution(150);
var tiffSettings = new TiffSettings
{
Shape = ShapeType.None,
SkipBlankPages = false,
Depth = Aspose.Pdf.Devices.ColorDepth.Default,
Compression = CompressionType.LZW
};
var tiffDevice = new TiffDevice(resolution, tiffSettings);
if (multiPageTiff)
{
Logger.InfoFormat("PDF to TIFF- Conversion started in Multi page");
// Combine all pages into one TIFF
tiffDevice.Process(document, outputFilePath);
}
else
{
// Create a separate TIFF for each page
string dir = Path.GetDirectoryName(outputFilePath)!;
string baseName = Path.GetFileNameWithoutExtension(outputFilePath);
for (int pageIndex = 1; pageIndex <= document.Pages.Count; pageIndex++)
{
string singlePagePath = Path.Combine(dir, $"{baseName}_page{pageIndex}.tiff");
Logger.InfoFormat("PDF to TIFF- Conversion started in Single page");
tiffDevice.Process(document, pageIndex, pageIndex, singlePagePath);
}
}
}