PDF to TIFF Conversion Produces Only Black & White Output (Aspose.PDF 21.6.0)

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);
            }
        }
    }

@mukeshkanna

  • Are you observing this black-and-white output behavior consistently across all PDFs, or only with specific documents (e.g., those with dark backgrounds or certain color spaces)?
  • Have you tested the same conversion using a different Aspose.PDF version to confirm if this issue is specific to 21.6.0?
  • Is the Depth = Aspose.Pdf.Devices.ColorDepth.Default setting intended to produce color output, or have you explicitly tried ColorDepth.Color24Bit to force color?
  • Does the issue occur on both Windows and Linux, or only on one of the platforms?
  • The all PDFs are contains only black and white content in the output file.

  • We used only 21.6.0 version in the Aspose.PDF conversion

  • ColorDepth.Color24Bit is not in the ColorDepth property, we have only the
    Default = 0,
    Format8bpp = 1,
    Format4bpp = 2,
    Format1bpp = 3

  • This issue occur on the Amazon Linux platform only, in the Windows it’s working as expected

@mukeshkanna

The user is reporting a code-related issue where PDF to TIFF conversion produces black and white output instead of color, specifically on Amazon Linux, with details about API usage and environment. This requires troubleshooting the code and environment configuration.

@mukeshkanna
Could you also provide the file that you add as input in the following line, please?

using (var document = new Document(inputFilePath))

We are facing an issue with any PDF files, not a particular PDF file.
We have attached the example file that encountered the same issue.
Issue_Doc.pdf (731.6 KB)

1 Like

@mukeshkanna
thank you, I’ll look into the issue and investigate it

@mukeshkanna
I tested on latest version(currently it is 25.12) and seems like issue is fixed. Could you check if this is true in your case?

@ilyazhuykov
I need to confirm if the ColorDepth.Format24bpp is supported on Amazon Linux version 2. I am currently using Aspose.PDF v24.12.0 with .NET Core v3.1. However, my output TIFF file is showing as 0 bytes after the conversion on my sites, which are running on Amazon Linux version 2. Could you please clarify the TiffSettings for me?

var resolution = new Resolution(150);
var tiffSettings = new TiffSettings
{
Shape = ShapeType.None,
SkipBlankPages = false,
Depth = Aspose.Pdf.Devices.ColorDepth.Default,
Compression = CompressionType.LZW
};

@mukeshkanna
Could you try version Aspose Pdf Drawing? As far as I know it is more designed for using on Linux systems while Aspose Pdf currently may run into such issues
For now I checked and latest version has option for ColorDepth.Format24bpp, it seems that default is used for something else.
Generally I don’t see any problem with settings, they look fine.