Bug 119103 - LibreOffice Draw cant display some pages of pdf files
Summary: LibreOffice Draw cant display some pages of pdf files
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords: bibisected, bisected, filter:pdf, regression
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2018-08-05 05:54 UTC by Kuruvilla Mani
Modified: 2024-05-21 13:52 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
The pdf file that caused the bug (295.66 KB, application/pdf)
2018-08-05 05:57 UTC, Kuruvilla Mani
Details
Rebuilt source file (277.60 KB, application/pdf)
2018-08-08 13:07 UTC, vvort
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kuruvilla Mani 2018-08-05 05:54:11 UTC
Description:
When opening the attached PDF files, some pages are blank even though they show up in other applications. 

Steps to Reproduce:
1.Open the attached file with LibreOffice Draw
2.
3.

Actual Results:
Page 2 is blank.

Expected Results:
There was some content on page 2. It should have been displayed


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Comment 1 Kuruvilla Mani 2018-08-05 05:57:21 UTC
Created attachment 143974 [details]
The pdf file that caused the bug
Comment 2 Roman Kuznetsov 2018-08-05 09:55:09 UTC
confirm in

Version: 6.1.0.3 (x64)
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: ru-RU (ru_RU); Calc: CL

all PDF shows not correct, include empty second page as was in description
Comment 3 V Stuart Foote 2018-08-05 12:52:20 UTC
Confirmed on Windows 10 Home 64-bit en-US with
Version: 6.2.0.0.alpha0+ (x64)
Build ID: 7119184f4b5441600f7b3eae7ec6771c094bbb7f
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-07-23_05:38:07
Locale: en-US (en_US); Calc: CL

The insert as image filter handles each page of the PDF with correct rendering to canvas (but provides no page selection yet (bug 114234), so have to split PDF externally, e.g. with PDFtk or similar).

Also when split apart the pdfio import to Draw of each individual page renders each page fully, with some layering and font weight issues.

So, just the filter import/opening of the full PDF shows issues with 2nd and 3rd page of the PDF.
Comment 4 Xisco Faulí 2018-08-07 17:27:08 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2018-08-07 17:35:48 UTC Comment hidden (obsolete)
Comment 6 Xisco Faulí 2018-08-08 07:22:46 UTC
No problem rendering the file in Evince 3.18.2 or Okular 1.1.3, putting it back to NEW, it must be a LibreOffice problem...
Comment 7 Xisco Faulí 2018-08-08 07:25:23 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=10290000117b562e3f179c3d1073774dd54cdfee

author	Caolán McNamara <caolanm@redhat.com>	2016-08-12 15:19:57 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2016-08-14 15:22:35 +0000
commit 10290000117b562e3f179c3d1073774dd54cdfee (patch)
tree 7a744a1d41ca05e37cd3935246b48830e6c72c0d
parent 32881f01833dbcefd5600e1135dd8743178bfd96 (diff)
Resolves: tdf#101460 use most recent poppler release

Bisected with: bibisect-linux-64-5.3

Adding Cc: to Caolán McNamara
Comment 8 Xisco Faulí 2018-08-08 07:36:46 UTC
@Vort, I thought you could be interested in this issue...
Comment 9 vvort 2018-08-08 13:07:06 UTC
Created attachment 144028 [details]
Rebuilt source file
Comment 10 vvort 2018-08-08 13:15:01 UTC
It is not necessary to split this file.
qpdf 5.1.0 can fix it with simple command (see attachment):
qpdf 1.pdf 2.pdf
However, when I updated qpdf to 8.1.0, result was quite different:
WARNING: 1.pdf: file is damaged
WARNING: 1.pdf (xref table, offset 302259): invalid xref entry (obj=344)
WARNING: 1.pdf: Attempting to reconstruct cross-reference table
qpdf: operation succeeded with warnings; resulting file may have some problems
The final file (2.pdf) was empty (915 bytes instead of 284267 bytes for version 5.1.0)
So file looks like damaged in some way.
And different viewers/editors reacts differently to this problem.
Comment 11 Xisco Faulí 2018-08-08 13:38:42 UTC
I do confirm the rebuilt file opens correctly in

Version: 6.2.0.0.alpha0+
Build ID: c86a47a9d3debbc7e8ee6247f573e7f98c611f19
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Vort, thank you very much! Should be consider this as an issue or should be close it as NOTABUG ?
Comment 12 vvort 2018-08-08 13:55:12 UTC
I have tested original file with poppler pdftocairo 0.45 and 0.47 (strangely, there are no binaries available for 0.46) and results were correct.
So I guess, there is a chance that this bug can be fixed from LO side.
Comment 13 V Stuart Foote 2018-08-08 14:44:52 UTC
(In reply to vvort from comment #10)
> WARNING: 1.pdf: file is damaged
> WARNING: 1.pdf (xref table, offset 302259): invalid xref entry (obj=344)
> WARNING: 1.pdf: Attempting to reconstruct cross-reference table

Interestingly object 344 [1] is the "KTU STUDENTS" background text being applied to each page. The "rebuilt" version has deleted the object during repair. 

And, for what its worth, Word 2016 hacks it up pretty badly also on import.

=-ref-=
[1] 
<snip>
344 0 obj
<</Length 88
/Matrix [1.0000 0.0000 0.0000 1.0000 0.0000 0.0000]
/BBox [25.2000 354.5280 586.8000 437.4720]
/PieceInfo 349 0 R
/Type /XObject
/Resources 341 0 R
/Subtype /Form
>>
stream
BT
0 0 0 rg
0 0 0 RG
0 w
/GS0 gs
/F0 72 Tf
1 0 0 1 25.2 365.832 Tm
(KTU  STUDENTS)Tj
ET

endstream
endobj
</snip>
Comment 14 QA Administrators 2019-08-19 06:58:28 UTC Comment hidden (obsolete)
Comment 15 Roman Kuznetsov 2020-02-20 08:39:00 UTC
still repro with PDf from attach in

Версия: 7.0.0.0.alpha0+ (x64)
ID сборки: 41177730421f9be9ad955766a5a19667d8003b11
Потоков ЦП: 4; ОС: Windows 10.0 Build 18362; Отрисовка ИП: по умолчанию; VCL: win; 
Локаль: ru-RU (ru_RU); Язык интерфейса: ru-RU
Calc: threaded
Comment 16 QA Administrators 2022-04-14 03:40:41 UTC Comment hidden (obsolete)
Comment 17 Stéphane Guillou (stragu) 2023-06-29 13:26:14 UTC
Still reproducible in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3551d18404cb19cdaa8edb170a549f5c5405d0cb
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 18 Timur 2024-05-21 13:52:40 UTC
Conclusion here is that this is LO problem, but if it came from poppler update, seems that it is not a regression by the commiter, so I remove Caolán.
pdfium is OK.