DocumentUltimate icon indicating copy to clipboard operation
DocumentUltimate copied to clipboard

TIFFs render as a black screen in DocumentViewer (other viewers display them fine)

Open bahaAbualkibash opened this issue 1 month ago • 5 comments

Summary Most TIFF images I open in DocumentUltimate’s DocumentViewer render as a black screen (no content), while the same files display correctly in other viewers from different vendors. This suggests the problem is in the viewer/decoder pipeline rather than the files themselves.

Environment

  • DocumentUltimate version: 7.6.0
  • .NET runtime: .NET 9
  • App type: ASP.NET Core
  • OS (server): Windows Server 2019
  • Browsers tested: Chrome, Edge
  • Hosting: IIS

If helpful, here’s the minimal flow I’m using (simplified):

  • Open TIFF as a stream/byte[] from storage
  • Provide it to DocumentViewer as the document source
  • No special options or transformations applied

Expected Behavior

  • The TIFF pages should render normally in the viewer (as they do in other viewers).

Actual Behavior

  • The main canvas renders as a black screen.
  • Thumbnails are also black in some cases.
  • No user-visible error is shown in the UI.

Notes & Clues

  • The same TIFFs open correctly in other tools/viewers (e.g., IrfanView, Windows Photos, Nutrient SDK viewer, Doconut).

  • With some problematic files, I see warnings like (from image/decoder logs):

    • JPEGPreDecode: Warning, Improper JPEG strip/tile size, expected 1700x2377, got 566x2377
    • JPEGPreDecode: Improper JPEG component count
  • These files appear to be classic TIFF (not BigTIFF). Some have JPEG-in-TIFF (possibly Old-style JPEG / OJPEG, Compression=6) and/or YCbCr photometric interpretation.

bahaAbualkibash avatar Oct 27 '25 13:10 bahaAbualkibash

Do you read the release notes? This was already fixed back in Version 7.6.6 - July 3, 2025:

  • Fixed: Conversion and viewing of some TIFF files. The output image was corrupted or had wrong colors especially for files with RGB Photometric and LZW compression. This happened because of mistreating BitsPerSample tag and for some files re-using Predictor tag.

    We will also try to add PageNumber, SubfileType, ImageDescription tags when outputting multi-paged TIFF files (PDF to TIFF). Currently seems to work for first page only but will revisit this in future release as it should work for all pages.

    When loading a TIFF file and then saving as a TIFF file, if the input compression format is not supported for encoding, Lzw compression will be used instead of no compression. For example, OldJpeg (Jpeg6, legacy) can be decoded but it can't be encoded so it will be encoded with Lzw.

  • Improved: Avoid memory pressure and errors for TIFF to PDF conversions (e.g. 100 pages TIFF file). For all image to PDF conversions, restrict image size to A4 paper bounds, to avoid unnecessary large PDF files, to have good enough size for printing.

Latest version is Version 7.8.0 - October 20, 2025: https://docs.gleamtech.com/documentultimate/html/version-history.htm

GleamTech avatar Oct 27 '25 13:10 GleamTech

I reproduced the exact same black-screen behavior on your official DocumentViewer live demo today.

Could you please confirm which version the live demo is currently running?

bahaAbualkibash avatar Oct 27 '25 13:10 bahaAbualkibash

It runs the latest version, see screenshot:

Image

https://demos.gleamtech.com/documentultimate/AspNetCoreCS/#DocumentViewer/Overview

The problem may be due to Old-style JPEG / OJPEG encoding. Can you provide a test document?

GleamTech avatar Oct 27 '25 13:10 GleamTech

Well in Windows Explorer, thumbnail for the second file cannot be shown:

Image

Windows Photo Viewer can only display the first file and not the second file:

Image Image

So the second file may be actually a corrupted file. Both shows black in DocumentUltimate.

GleamTech avatar Oct 27 '25 13:10 GleamTech

first file → Old-style JPEG in TIFF (reported as “Old-style JPEG”). second file → OJPEG (TIFF Compression=6). Yeah Windows Photo Viewer can't open second one only in other tools like IrfanView

bahaAbualkibash avatar Oct 27 '25 13:10 bahaAbualkibash