Bug 377202

Summary: Empty DJVU page displayed in black
Product: [Applications] okular Reporter: Alexander Trufanov <trufanovan>
Component: DjVu backendAssignee: Okular developers <okular-devel>
Status: REOPENED ---    
Severity: normal    
Priority: NOR    
Version: 1.0.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: sample doc
Djvu doc 2

Description Alexander Trufanov 2017-03-04 14:48:01 UTC
Created attachment 104364 [details]
sample doc

If I open a djvu document in Okular its empty pages are displayed in black or even with some artifacts instead of solid white color.
All other viewers display such documents correctly.
The sample one page djvu is attached. 

This djvu is made with DJVU Small 0.4.4 from one solid white tiff page.
Comment 1 Alexander Trufanov 2017-03-04 14:58:44 UTC
Environment:
Kubuntu 16.10
djvulibre 3.5.27.1-6
okular 4:16.04.3-0ubuntu1
Comment 2 Alexander Trufanov 2017-03-04 18:31:11 UTC
Have also reproduced with 
djvulibre 3.5.27.1-7
okular 1.0.1 package 4:16.12.1-0ubuntu2
Comment 3 Albert Astals Cid 2017-03-05 18:52:25 UTC
Git commit 0419812ad7b86417bfda3e165957f33419e9fa4f by Albert Astals Cid.
Committed on 05/03/2017 at 18:51.
Pushed by aacid into branch 'Applications/16.12'.

djvu: Initialize to white if rendering fails

It's what ddjvu does, and also it's not nice to return an uninitialzed image back to the user

M  +4    -0    generators/djvu/kdjvu.cpp

https://commits.kde.org/okular/0419812ad7b86417bfda3e165957f33419e9fa4f
Comment 4 Alexander Trufanov 2017-03-05 19:43:11 UTC
Thanks!
Comment 5 Alexander Trufanov 2019-04-22 09:03:14 UTC
Hi,

I've just updated to Kubuntu 19.04 and got new Okular 1.6.3 which correctly display empty djvu pages. But, I've found a document where it still have a bug. It hapens only on page 3 (first empty page in doc), but not for other empty pages. And it's easy to reproduce if you try to zoom this page.

So, check the attached document, got to page 3, zoom it. You'll get a corrupt page view.
Comment 6 Alexander Trufanov 2019-04-22 09:07:48 UTC
Created attachment 119550 [details]
Djvu doc 2

This djvu contain page 3 which is displayed incorrectly when zoomed.