GNU bug report logs - #14580
24.3; docview-mode doesn't work for multi-page pdf in 24.3

Previous Next

Package: emacs;

Reported by: Neal Becker <ndbecker2 <at> gmail.com>

Date: Sat, 8 Jun 2013 22:05:02 UTC

Severity: normal

Tags: moreinfo

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14580 in the body.
You can then email your comments to 14580 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14580; Package emacs. (Sat, 08 Jun 2013 22:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neal Becker <ndbecker2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 08 Jun 2013 22:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Neal Becker <ndbecker2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
Date: Sat, 8 Jun 2013 17:59:58 -0400
[Message part 1 (text/plain, inline)]
From: nbecker <ndbecker2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
--text follows this line--
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgment at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

Worked fine in 24.2, but since update to 24.3 it is intermittent.  It
sometimes works, but usually seems to think multi-page pdf has only 1
page.  After reporting on emacs-help, another user has confirmed this
bug.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.3/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-19 on nbecker7
Windowing system distributor `Fedora Project', version 11.0.11303000
System Description: Fedora release 18 (Spherical Cow)

Configured using:
 `configure '--build=x86_64-redhat-linux-gnu'
 '--host=x86_64-redhat-linux-gnu' '--program-prefix='
 '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr'
 '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
 '--datadir=/usr/share' '--includedir=/usr/include'
 '--libdir=/usr/lib64' '--libexecdir=/usr/libexec'
 '--localstatedir=/var' '--sharedstatedir=/var/lib'
 '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus'
 '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff'
 '--with-xft' '--with-xpm' '--with-x-toolkit=gtk3' '--with-gpm=no'
 'build_alias=x86_64-redhat-linux-gnu'
 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
 --param=ssp-buffer-size=4 -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ''

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Dired by name

Minor modes in effect:
  global-auto-complete-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<return> C-x C-f ~ / n o n <tab> <return> C-x C-f C-a
C-g <help-echo> <help-echo> <help-echo> <help-echo>
M-x r e p o r t - e m <tab> <return>

Recent messages:
Invoking man git-stash in the background
Please wait: formatting the git-stash man page...
git-stash man page formatted
Directory has changed on disk; type g to update Dired
Quit [3 times]
Mark set
byte-code: End of buffer
Quit
Mark set
Replaced 2 occurrences
Quit [2 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils tabify man misearch multi-isearch two-column
iso-transl help-mode vc-git cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs sh-script smie
rpm-spec-mode dired auto-complete popup zoom-frm frame-cmds frame-fns
avoid ein-autoloads elpy-autoloads find-file-in-project-autoloads
frame-cmds-autoloads frame-fns-autoloads fuzzy-autoloads
highlight-indentation-autoloads idomenu-autoloads iedit-autoloads
jedi-autoloads auto-complete-autoloads epc-autoloads ctable-autoloads
concurrent-autoloads deferred-autoloads markdown-mode-autoloads
mode-icons-autoloads nose-autoloads popup-autoloads request-autoloads
undo-tree-autoloads virtualenv-autoloads websocket-autoloads
yasnippet-autoloads zoom-frm-autoloads package cl-macs gv
browse-kill-ring edmacro kmacro rst time org-install ipython advice
help-fns advice-preload python-mode info-look info easymenu compile
executable shell pcomplete comint ansi-color ring cl cl-lib delsel
cus-start cus-load time-date tooltip ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14580; Package emacs. (Sun, 09 Jun 2013 09:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 14580 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Neal Becker <ndbecker2 <at> gmail.com>
Cc: 14580 <at> debbugs.gnu.org
Subject: Re: bug#14580: 24.3;
 docview-mode doesn't work for multi-page pdf in 24.3
Date: Sun, 09 Jun 2013 10:59:01 +0200
Neal Becker <ndbecker2 <at> gmail.com> writes:

> Worked fine in 24.2, but since update to 24.3 it is intermittent.  It
> sometimes works, but usually seems to think multi-page pdf has only 1
> page.

Do you have any more details?  Does that happen only with some specific
PDF file?  Can you provide a recipe starting with "emacs -Q"?

> After reporting on emacs-help, another user has confirmed this bug.

Next time, please link the other thread.  This time, I've found it
myself.  As far as I interpret Peter's reply to your mail, this happens
only with some very special PDF files created by XeTeX.  Could you
please provide such a file for testing?

Bye,
Tassilo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14580; Package emacs. (Mon, 10 Jun 2013 17:58:02 GMT) Full text and rfc822 format available.

Message #11 received at 14580 <at> debbugs.gnu.org (full text, mbox):

From: Neal Becker <ndbecker2 <at> gmail.com>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 14580 <at> debbugs.gnu.org
Subject: Re: bug#14580: 24.3;
 docview-mode doesn't work for multi-page pdf in 24.3
Date: Mon, 10 Jun 2013 13:57:36 -0400
[Message part 1 (text/plain, inline)]
I hope attaching the file here will work.


On Sun, Jun 9, 2013 at 4:59 AM, Tassilo Horn <tsdh <at> gnu.org> wrote:

> Neal Becker <ndbecker2 <at> gmail.com> writes:
>
> > Worked fine in 24.2, but since update to 24.3 it is intermittent.  It
> > sometimes works, but usually seems to think multi-page pdf has only 1
> > page.
>
> Do you have any more details?  Does that happen only with some specific
> PDF file?  Can you provide a recipe starting with "emacs -Q"?
>
> > After reporting on emacs-help, another user has confirmed this bug.
>
> Next time, please link the other thread.  This time, I've found it
> myself.  As far as I interpret Peter's reply to your mail, this happens
> only with some very special PDF files created by XeTeX.  Could you
> please provide such a file for testing?
>
> Bye,
> Tassilo
>
[Message part 2 (text/html, inline)]
[esno_simple_dat.pdf (application/pdf, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14580; Package emacs. (Mon, 10 Jun 2013 17:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 14580 <at> debbugs.gnu.org (full text, mbox):

From: Neal Becker <ndbecker2 <at> gmail.com>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 14580 <at> debbugs.gnu.org
Subject: Re: bug#14580: 24.3;
 docview-mode doesn't work for multi-page pdf in 24.3
Date: Mon, 10 Jun 2013 13:58:27 -0400
[Message part 1 (text/plain, inline)]
Also, these are not some special files from XeTeX.  I'm using matplotlib,
and it seems to happen something like 50% of the time.


On Mon, Jun 10, 2013 at 1:57 PM, Neal Becker <ndbecker2 <at> gmail.com> wrote:

> I hope attaching the file here will work.
>
>
> On Sun, Jun 9, 2013 at 4:59 AM, Tassilo Horn <tsdh <at> gnu.org> wrote:
>
>> Neal Becker <ndbecker2 <at> gmail.com> writes:
>>
>> > Worked fine in 24.2, but since update to 24.3 it is intermittent.  It
>> > sometimes works, but usually seems to think multi-page pdf has only 1
>> > page.
>>
>> Do you have any more details?  Does that happen only with some specific
>> PDF file?  Can you provide a recipe starting with "emacs -Q"?
>>
>> > After reporting on emacs-help, another user has confirmed this bug.
>>
>> Next time, please link the other thread.  This time, I've found it
>> myself.  As far as I interpret Peter's reply to your mail, this happens
>> only with some very special PDF files created by XeTeX.  Could you
>> please provide such a file for testing?
>>
>> Bye,
>> Tassilo
>>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14580; Package emacs. (Tue, 11 Jun 2013 06:34:02 GMT) Full text and rfc822 format available.

Message #17 received at 14580 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Neal Becker <ndbecker2 <at> gmail.com>
Cc: 14580 <at> debbugs.gnu.org
Subject: Re: bug#14580: 24.3;
 docview-mode doesn't work for multi-page pdf in 24.3
Date: Tue, 11 Jun 2013 08:33:35 +0200
Neal Becker <ndbecker2 <at> gmail.com> writes:

Hi Neal,

> Also, these are not some special files from XeTeX.  I'm using
> matplotlib,

I've tried opening your sample PDF about a dozen times using emacs 24.3
as well as the current emacs trunk, each version both with -Q and with
my customizations.  In all cases, the PDF had 3 pages...

> and it seems to happen something like 50% of the time.

One thing that might explain parts of your problem: when you open the
file initially and then something fails and only the first page is
converted, then any subsequent opening of the file will only access the
single cached image without checking if the PDF has actually more pages
than there are images already.  To force a reconversion, you can hit `g'
in the doc-view buffer.

But still, if ghostscript or mupdf error when converting a document, you
should at least get some message like "ghostscript terminated with exit
code XX"...

Not sure, but maybe it's a problem with your ghostscript or mupdf
version.  What's the value of `doc-view-pdf->png-converter-function'?
If it is `doc-view-pdf->png-converter-mupdf', then try

  $ mudraw -o doc%d.png doc.pdf

on the command line.

If it is `doc-view-pdf->png-converter-ghostscript', then try

  $ gs -dSAFER -dNOPAUSE -sDEVICE=png16m -dTextAlphaBits=4 \
       -dBATCH -dGraphicsAlphaBits=4 -dQUIET -sOutputFile=doc%d.png \
       doc.pdf

Does that produce one image per page in the PDF, i.e., 3 images for your
sample file?

Bye,
Tassilo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14580; Package emacs. (Tue, 11 Jun 2013 12:05:01 GMT) Full text and rfc822 format available.

Message #20 received at 14580 <at> debbugs.gnu.org (full text, mbox):

From: Neal Becker <ndbecker2 <at> gmail.com>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 14580 <at> debbugs.gnu.org
Subject: Re: bug#14580: 24.3;
 docview-mode doesn't work for multi-page pdf in 24.3
Date: Tue, 11 Jun 2013 08:04:33 -0400
[Message part 1 (text/plain, inline)]
When using gs to convert, I do get 3 _different_ png files.

Using docview, it's really weird.  I hit 'g', and answer 'yes'.  As I page
through, it says pages 1/3 ... 3/3, but it displays _the same image for all
3 pages!!_.  I tried repeatedly killing buffer, visiting, hitting 'g' to
reload - nothing I tried seems to fix it.


On Tue, Jun 11, 2013 at 2:33 AM, Tassilo Horn <tsdh <at> gnu.org> wrote:

> Neal Becker <ndbecker2 <at> gmail.com> writes:
>
> Hi Neal,
>
> > Also, these are not some special files from XeTeX.  I'm using
> > matplotlib,
>
> I've tried opening your sample PDF about a dozen times using emacs 24.3
> as well as the current emacs trunk, each version both with -Q and with
> my customizations.  In all cases, the PDF had 3 pages...
>
> > and it seems to happen something like 50% of the time.
>
> One thing that might explain parts of your problem: when you open the
> file initially and then something fails and only the first page is
> converted, then any subsequent opening of the file will only access the
> single cached image without checking if the PDF has actually more pages
> than there are images already.  To force a reconversion, you can hit `g'
> in the doc-view buffer.
>
> But still, if ghostscript or mupdf error when converting a document, you
> should at least get some message like "ghostscript terminated with exit
> code XX"...
>
> Not sure, but maybe it's a problem with your ghostscript or mupdf
> version.  What's the value of `doc-view-pdf->png-converter-function'?
> If it is `doc-view-pdf->png-converter-mupdf', then try
>
>   $ mudraw -o doc%d.png doc.pdf
>
> on the command line.
>
> If it is `doc-view-pdf->png-converter-ghostscript', then try
>
>   $ gs -dSAFER -dNOPAUSE -sDEVICE=png16m -dTextAlphaBits=4 \
>        -dBATCH -dGraphicsAlphaBits=4 -dQUIET -sOutputFile=doc%d.png \
>        doc.pdf
>
> Does that produce one image per page in the PDF, i.e., 3 images for your
> sample file?
>
> Bye,
> Tassilo
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14580; Package emacs. (Wed, 12 Jun 2013 07:11:01 GMT) Full text and rfc822 format available.

Message #23 received at 14580 <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Neal Becker <ndbecker2 <at> gmail.com>
Cc: 14580 <at> debbugs.gnu.org
Subject: Re: bug#14580: 24.3;
 docview-mode doesn't work for multi-page pdf in 24.3
Date: Wed, 12 Jun 2013 09:10:37 +0200
Neal Becker <ndbecker2 <at> gmail.com> writes:

> When using gs to convert, I do get 3 _different_ png files.

That's how it's supposed to be.

> Using docview, it's really weird.  I hit 'g', and answer 'yes'.  As I
> page through, it says pages 1/3 ... 3/3, but it displays _the same
> image for all 3 pages!!_.

Really weird.  doc-view puts the images in a directory

  /tmp/docview<UID>/foo.pdf-<md5sum>/

and names them page-<number>.png.  So with that document, is there
really page-1.png, page-2.png, and page-3.png, and all are the same?

Bye,
Tassilo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14580; Package emacs. (Sat, 26 Dec 2015 00:51:01 GMT) Full text and rfc822 format available.

Message #26 received at 14580 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: Neal Becker <ndbecker2 <at> gmail.com>, 14580 <at> debbugs.gnu.org
Subject: Re: bug#14580: 24.3;
 docview-mode doesn't work for multi-page pdf in 24.3
Date: Sat, 26 Dec 2015 01:49:54 +0100
Tassilo Horn <tsdh <at> gnu.org> writes:

> Neal Becker <ndbecker2 <at> gmail.com> writes:
>
>> When using gs to convert, I do get 3 _different_ png files.
>
> That's how it's supposed to be.
>
>> Using docview, it's really weird.  I hit 'g', and answer 'yes'.  As I
>> page through, it says pages 1/3 ... 3/3, but it displays _the same
>> image for all 3 pages!!_.
>
> Really weird.  doc-view puts the images in a directory
>
>   /tmp/docview<UID>/foo.pdf-<md5sum>/
>
> and names them page-<number>.png.  So with that document, is there
> really page-1.png, page-2.png, and page-3.png, and all are the same?

More information was requested, but no response was given within a few
months, so I'm closing this bug report.  If the problem still exists,
please reopen this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 14580 <at> debbugs.gnu.org and Neal Becker <ndbecker2 <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 26 Dec 2015 00:51:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Jan 2016 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.