unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
@ 2013-06-08 21:59 Neal Becker
  2013-06-09  8:59 ` Tassilo Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Neal Becker @ 2013-06-08 21:59 UTC (permalink / raw)
  To: 14580

[-- Attachment #1: Type: text/plain, Size: 5367 bytes --]

From: nbecker <ndbecker2@gmail.com>
To: bug-gnu-emacs@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)

[-- Attachment #2: Type: text/html, Size: 7313 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
  2013-06-08 21:59 bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3 Neal Becker
@ 2013-06-09  8:59 ` Tassilo Horn
  2013-06-10 17:57   ` Neal Becker
  0 siblings, 1 reply; 8+ messages in thread
From: Tassilo Horn @ 2013-06-09  8:59 UTC (permalink / raw)
  To: Neal Becker; +Cc: 14580

Neal Becker <ndbecker2@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
  2013-06-09  8:59 ` Tassilo Horn
@ 2013-06-10 17:57   ` Neal Becker
  2013-06-10 17:58     ` Neal Becker
  0 siblings, 1 reply; 8+ messages in thread
From: Neal Becker @ 2013-06-10 17:57 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: 14580


[-- Attachment #1.1: Type: text/plain, Size: 807 bytes --]

I hope attaching the file here will work.


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

> Neal Becker <ndbecker2@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
>

[-- Attachment #1.2: Type: text/html, Size: 1233 bytes --]

[-- Attachment #2: esno_simple_dat.pdf --]
[-- Type: application/pdf, Size: 445165 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
  2013-06-10 17:57   ` Neal Becker
@ 2013-06-10 17:58     ` Neal Becker
  2013-06-11  6:33       ` Tassilo Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Neal Becker @ 2013-06-10 17:58 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: 14580

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

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@gmail.com> wrote:

> I hope attaching the file here will work.
>
>
> On Sun, Jun 9, 2013 at 4:59 AM, Tassilo Horn <tsdh@gnu.org> wrote:
>
>> Neal Becker <ndbecker2@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
>>
>
>

[-- Attachment #2: Type: text/html, Size: 1808 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
  2013-06-10 17:58     ` Neal Becker
@ 2013-06-11  6:33       ` Tassilo Horn
  2013-06-11 12:04         ` Neal Becker
  0 siblings, 1 reply; 8+ messages in thread
From: Tassilo Horn @ 2013-06-11  6:33 UTC (permalink / raw)
  To: Neal Becker; +Cc: 14580

Neal Becker <ndbecker2@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
  2013-06-11  6:33       ` Tassilo Horn
@ 2013-06-11 12:04         ` Neal Becker
  2013-06-12  7:10           ` Tassilo Horn
  0 siblings, 1 reply; 8+ messages in thread
From: Neal Becker @ 2013-06-11 12:04 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: 14580

[-- Attachment #1: Type: text/plain, Size: 1957 bytes --]

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@gnu.org> wrote:

> Neal Becker <ndbecker2@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
>

[-- Attachment #2: Type: text/html, Size: 2601 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
  2013-06-11 12:04         ` Neal Becker
@ 2013-06-12  7:10           ` Tassilo Horn
  2015-12-26  0:49             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Tassilo Horn @ 2013-06-12  7:10 UTC (permalink / raw)
  To: Neal Becker; +Cc: 14580

Neal Becker <ndbecker2@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3
  2013-06-12  7:10           ` Tassilo Horn
@ 2015-12-26  0:49             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2015-12-26  0:49 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: Neal Becker, 14580

Tassilo Horn <tsdh@gnu.org> writes:

> Neal Becker <ndbecker2@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-26  0:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-08 21:59 bug#14580: 24.3; docview-mode doesn't work for multi-page pdf in 24.3 Neal Becker
2013-06-09  8:59 ` Tassilo Horn
2013-06-10 17:57   ` Neal Becker
2013-06-10 17:58     ` Neal Becker
2013-06-11  6:33       ` Tassilo Horn
2013-06-11 12:04         ` Neal Becker
2013-06-12  7:10           ` Tassilo Horn
2015-12-26  0:49             ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).