ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Michał Goliński" <golinski@amu.edu.pl>
To: ntg-context@ntg.nl
Subject:  Strange error with bookmarks
Date: Tue, 14 Oct 2014 13:41:57 +0200	[thread overview]
Message-ID: <20141014114157.B56B7AA456@pp.amu.edu.pl> (raw)
In-Reply-To: <5400DD6B.9060802@wxs.nl>

It does indeed be somehow connected with the specific reader that
I use (okular). Nevertheless, evince gives the same error, and I have found out,
that even jpdfbookmarks_cli has problems as it raises an exception when I try
to dump the bookmarks:

  Exception in thread "main" java.lang.ClassCastException: com.lowagie.text.pdf.PdfNumber cannot be cast to com.lowagie.text.pdf.PdfString

Still, in Acrobat Readers it works perfectly.

In the meantime I have came up with a ConTeXt solution, so one can compare
the resulting PDF files. Unfortunately I have only a limited understanding
of the details of PDF files.

The file giving the error is:

\pdfcompresslevel=0 \pdfobjcompresslevel=0
\setupinteraction[state=start,focus=standard]
\placebookmarks[part,chapter][part,chapter][number=no]
\starttext
\chapter{0}
\startpart[title={A}]
  \chapter{1}
  \chapter{2}
\stoppart
\startpart[title={B}]
  \chapter{3}
  \chapter{4}
  \chapter{5}
  \chapter{6}
  \chapter{7}
  \chapter{8}
  \chapter{9}
  \chapter{10}
\stoppart
\completecontent[criterium=all]
\stoptext

While the following files gives no problems in the applications that I have
tested (note the last command):

\pdfcompresslevel=0 \pdfobjcompresslevel=0
\setupinteraction[state=start,focus=standard]
\placebookmarks[part,chapter][part,chapter][number=no]
\starttext
\chapter{0}
\startpart[title={A}]
  \chapter{1}
  \chapter{2}
\stoppart
\startpart[title={B}]
  \chapter{3}
  \chapter{4}
  \chapter{5}
  \chapter{6}
  \chapter{7}
  \chapter{8}
  \chapter{9}
  \chapter{10}
\stoppart
\placecontent[criterium=all]
\stoptext


On 8/29/2014 22:07 PM, Hans Hagen wrote:
> On 8/26/2014 1:45 PM, Michał Goliński wrote:
> > While trying to make a longer document with ConTeXt I stumbled into a
> > strange error with the latest beta (I spotted it for the first time some
> > time ago). For the following file:
> >
> > \setupinteraction[state=start,focus=standard]
> > \placebookmarks[part,chapter][part,chapter][number=no]
> > \starttext
> > \chapter{0}
> > \startpart[title={A}]
> >    \chapter{1}
> >    \chapter{2}
> > \stoppart
> > \startpart[title={B}]
> >    \chapter{3}
> >    \chapter{4}
> >    \chapter{5}
> >    \chapter{6}
> >    \chapter{7}
> >    \chapter{8}
> >    \chapter{9}
> >    \chapter{10}
> > \stoppart
> > \completecontent[criterium=all]
> > \stoptext
> >
> >
> > ConTeXt would generate a file in which the link for chapter "6" is not
> > working. Neither the link in the table of contents works nor the link in
> > the generated PDF bookmarks. When removing the second line, the link in
> > the table of contents doesn't work, but everyting is ok if one removes
> > the table of contents. What seems even more weird for me, the problem
> > goes away if one removes *any* chapter. It persists for chapter "6" even
> > if chapters are distributed differently between parts without changing
> > their order.
> >
> > Am I doing something wrong? I hope someone might be able to help.
> 
> It works here (with summatrapdf) ... can it be a viewer issue? Do you 
> run the latest context?
> 
> Hans
> 
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                               | www.pragma-pod.nl
> -----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2014-10-14 11:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 11:45 Michał Goliński
2014-08-29 20:07 ` Hans Hagen
2014-10-14 11:41   ` Michał Goliński [this message]
2014-10-14 14:58     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141014114157.B56B7AA456@pp.amu.edu.pl \
    --to=golinski@amu.edu.pl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).