Bug 360201 - all PDF text dissapeared after highlighting the text.
Summary: all PDF text dissapeared after highlighting the text.
Status: RESOLVED DUPLICATE of bug 381708
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.20.3
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-07 10:18 UTC by azzamsa
Modified: 2017-06-28 23:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description azzamsa 2016-03-07 10:18:27 UTC
All text in PDF pages disappeared after highlighting some lines of text. i tried it more than 5 times , but the problems always occurred. but i can highlight the text without any issue with another PDF viewer ( ex : Foxit Reader )

Reproducible: Always

Steps to Reproduce:
1. open PDF file
2. highlighting the text
3. all the text in pages dissapeared

Actual Results:  
all the text in pages dissapeared

Expected Results:  
okular will highlighted the text

it just happen to the one books that i got here http://ebook-dl.com/item/java_a_beginner_guide_sixth_edition_herbert_schildt/
Comment 1 Albert Astals Cid 2016-03-07 23:58:30 UTC
Most probably a poppler bug but needs investigating
Comment 2 Jonathan Verner 2016-03-08 08:56:40 UTC
I can confirm the behaviour described. The same thing happens in the evince viewer suggesting that it is, in fact, a poppler bug. Also, I tried the following things:

 1. Add the annotation and save the file (both okular and evince)
     When I open the file, the annotation is lost but adding more annotations doesn't exhibit the 
     problem anymore. I.e. it seems that after poppler rewrites the file, the problems disappear.
     

 2. Add the annotation and delete it again: 

        evince doesn't allow me to delete the annotation (right-clicking on it shows the regular
         right-click menu without the option to delete the annotation)

        okular crashes on me with the following backtrace:

#6  0x00007f4004e70cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f4004e740d8 in __GI_abort () at abort.c:89
#8  0x00007f4004e69b86 in __assert_fail_base (fmt=0x7f4007f2d029 "%s%s%s:%u: %s%sP\305\231edpoklad \342\200\236%s\342\200\234 nespln\304\233n.\n%n", assertion=assertion@entry=0x7f3ff1759791 "pageobj != __null", file=file@entry=0x7f3ff1759738 "Annot.cc", line=line@entry=1808, function=function@entry=0x7f3ff175d640 <Annot::getRotation() const::__PRETTY_FUNCTION__> "int Annot::getRotation() const") at assert.c:92
#9  0x00007f4004e69c32 in __GI___assert_fail (assertion=0x7f3ff1759791 "pageobj != __null", file=0x7f3ff1759738 "Annot.cc", line=1808, function=0x7f3ff175d640 <Annot::getRotation() const::__PRETTY_FUNCTION__> "int Annot::getRotation() const") at assert.c:101
#10 0x00007f3ff166fb31 in Annot::getRotation (this=0x29d63e0) at Annot.cc:1808
#11 0x00007f3ff1670292 in AnnotTextMarkup::draw (this=0x29d63e0, gfx=0x7f3fe80037a0, printing=<optimized out>) at Annot.cc:3823
#12 0x00007f3ff16eb6ac in Page::displaySlice (this=0x23e7bc0, out=0x7f3fe828a9c0, out@entry=0x1e828a9c0, hDPI=hDPI@entry=6.9125935956414803e-310, vDPI=vDPI@entry=1.8601247458859261e-316, rotate=rotate@entry=32575, useMediaBox=useMediaBox@entry=false, crop=crop@entry=63, sliceX=sliceX@entry=0, sliceY=-1, sliceW=-1, sliceH=-1, printing=false, abortCheckCbk=0x0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0x0, annotDisplayDecideCbkData=0x0, copyXRef=true) at Page.cc:605
#13 0x00007f3ff16f1b19 in PDFDoc::displayPageSlice (this=<optimized out>, out=0x1e828a9c0, out@entry=0x7f3fe828a9c0, page=32575, page@entry=3, hDPI=6.9125935956414803e-310, hDPI@entry=91.788312920865906, vDPI=1.8601247458859261e-316, vDPI@entry=91.722676797194609, rotate=32575, rotate@entry=0, useMediaBox=useMediaBox@entry=false, crop=crop@entry=true, printing=255, printing@entry=false, sliceX=sliceX@entry=-1, sliceY=sliceY@entry=-1, sliceW=0, sliceW@entry=-1, sliceH=0, sliceH@entry=-1, abortCheckCbk=abortCheckCbk@entry=0x0, abortCheckCbkData=abortCheckCbkData@entry=0x0, annotDisplayDecideCbk=annotDisplayDecideCbk@entry=0x0, annotDisplayDecideCbkData=0x1, annotDisplayDecideCbkData@entry=0x0, copyXRef=copyXRef@entry=true) at PDFDoc.cc:498
#14 0x00007f3ff1a32f6d in Poppler::Page::renderToImage (this=this@entry=0x7f3fe8285800, xres=xres@entry=91.788312920865906, yres=yres@entry=91.722676797194609, x=-1, y=-1, w=-1, h=-1, rotate=Poppler::Page::Rotate0) at poppler-page.cc:317
#15 0x00007f3ff1c83f05 in PDFGenerator::image (this=0x22f1050, request=0x29b2960) at ../../../generators/poppler/generator_pdf.cpp:877
#16 0x00007f3ff612a843 in Okular::PixmapGenerationThread::run (this=0x36c23f0) at ../core/generator_p.cpp:64
#17 0x00007f40057f932f in QThreadPrivate::start (arg=0x36c23f0) at thread/qthread_unix.cpp:349
#18 0x00007f40024f5182 in start_thread (arg=0x7f3feed11700) at pthread_create.c:312
#19 0x00007f4004f3447d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111


Output of okular --version:

Qt: 4.8.6
KDE Development Platform: 4.14.13
Okular: 0.20.3

Output of pdftotext -v:

pdftotext version 0.24.5
Copyright 2005-2013 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC

Also, it seems that the pdf-file is in fact corrupt. This is (a part of) the output from
http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx:

The file trailer dictionary is missing or invalid.
The separator after an 'obj' must be an EOL. (730)
The separator before an 'endobj' must be an EOL.
The file trailer dictionary must have an id key.
Comment 3 azzamsa 2016-03-11 10:06:03 UTC
[SOLVED]

prolem solved using pdfchain, no any configuration needed, just using default configuration from pdfchain, save as it somewhere, and I can add the annotation, okular works  well for this pdf output from pdfchain, okular save the xml correctly, ( not like before, the xml are not written correctly)

update1 : select "repair document" and content list (bookmar list) will preserved.
Comment 4 Christoph Feck 2017-06-27 11:11:07 UTC
*** Bug 381708 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2017-06-28 23:08:36 UTC
It was an poppler bug.

*** This bug has been marked as a duplicate of bug 381708 ***