unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Neal Becker <ndbecker2@gmail.com>
Cc: 14580@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <87y5ahkvgg.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <CAG3t+pG4WL_e=w1TPtFBzqpVNG=A7beb8W4OSZOTiY-qesWC8g@mail.gmail.com> (Neal Becker's message of "Mon, 10 Jun 2013 13:58:27 -0400")

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





  reply	other threads:[~2013-06-11  6:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-06-11 12:04         ` Neal Becker
2013-06-12  7:10           ` Tassilo Horn
2015-12-26  0:49             ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87y5ahkvgg.fsf@thinkpad.tsdh.de \
    --to=tsdh@gnu.org \
    --cc=14580@debbugs.gnu.org \
    --cc=ndbecker2@gmail.com \
    /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.
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).