Bug 229141 - impossible to assign bookmarks in certain pdf files
Summary: impossible to assign bookmarks in certain pdf files
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.10
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-02 16:08 UTC by p92
Modified: 2010-03-27 19:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description p92 2010-03-02 16:08:27 UTC
Version:           0.10 (using 4.4.00 (KDE 4.4.0), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.31-19-generic

I have several okular opened with pdf files.

In all of them I can set up bookmarks but in the one joined I cannot. Neither CTRL-B nor  bookmark->add a bookmark menu action  work.

Expected : a bookmark appear in the bookmark menu toolbar that I can later select 

But no bookmark is created at all !
Comment 1 Pino Toscano 2010-03-02 16:11:18 UTC
> in the one joined

What does this mean?
Comment 2 p92 2010-03-02 18:43:37 UTC
I could not join the pdf where I have this problem (28 Mb). But I think I discovered the problem, my filename have an invalid char (\n) in the middle. Don't know how I have created such a filename. Here is a dump of this filename :

$ ls IBM* | od -xc
0000000    4249    204d    7953    7473    6d65    5320    6f74    6172
          I   B   M       S   y   s   t   e   m       S   t   o   r   a
0000020    6567    4e20    7320    7265    6569    0a73    6773    3432
          g   e       N       s   e   r   i   e   s  \n   s   g   2   4
0000040    3137    3932    702e    6664    000a
          7   1   2   9   .   p   d   f  \n
0000051
Comment 3 Glen Kaukola 2010-03-26 20:13:56 UTC
So do bookmarks work after fixing the filename?
Comment 4 p92 2010-03-27 00:27:27 UTC
yes they do
Comment 5 Glen Kaukola 2010-03-27 06:15:32 UTC
Caused by this:
https://bugs.kde.org/show_bug.cgi?id=140673

From /home/kdedev/kde/src/KDE/kdelibs/kio/bookmarks/kbookmark.cc:
QString KBookmark::fullText() const
{
    if (isSeparator())
        return i18n("--- separator ---");

    QString text = element.namedItem("title").toElement().text();
    text.replace('\n', ' '); // #140673
    return text;
}
Comment 6 Glen Kaukola 2010-03-27 07:00:37 UTC
Or I may have spoke too soon.  Investigating further.
Comment 7 Albert Astals Cid 2010-03-27 19:00:28 UTC
Fixed in commit r1108063 will be fixed in KDE 4.5