From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neal Becker Newsgroups: gmane.emacs.bugs Subject: 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-ID: References: <8738srirsa.fsf@thinkpad.tsdh.de> <87y5ahkvgg.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3a8f683f0d4304dedfb38f X-Trace: ger.gmane.org 1370952297 2127 80.91.229.3 (11 Jun 2013 12:04:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Jun 2013 12:04:57 +0000 (UTC) Cc: 14580@debbugs.gnu.org To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 11 14:04:57 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UmNJn-0001iV-56 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jun 2013 14:04:55 +0200 Original-Received: from localhost ([::1]:55952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmNJm-0000Zc-HV for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jun 2013 08:04:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmNJh-0000ZW-9B for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 08:04:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmNJf-0002fx-Q5 for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 08:04:49 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmNJf-0002fl-NJ for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 08:04:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UmNJu-0004Qb-2b for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 08:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Neal Becker Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jun 2013 12:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14580 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14580-submit@debbugs.gnu.org id=B14580.137095229516955 (code B ref 14580); Tue, 11 Jun 2013 12:05:01 +0000 Original-Received: (at 14580) by debbugs.gnu.org; 11 Jun 2013 12:04:55 +0000 Original-Received: from localhost ([127.0.0.1]:56171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmNJm-0004PD-RH for submit@debbugs.gnu.org; Tue, 11 Jun 2013 08:04:55 -0400 Original-Received: from mail-vb0-f51.google.com ([209.85.212.51]:47978) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmNJl-0004O6-Ek for 14580@debbugs.gnu.org; Tue, 11 Jun 2013 08:04:54 -0400 Original-Received: by mail-vb0-f51.google.com with SMTP id x17so5217942vbf.10 for <14580@debbugs.gnu.org>; Tue, 11 Jun 2013 05:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=lF2dT5XG3+eoTOKxwuBSDG4AwYeKMxCodCD2nLEqwKw=; b=qkE2Qosb4PP1lIrDN58X4puwm56lgShW2qEgtIwvCH/LTOAJxFoamuXoBdAwE+Kb+N djqgDoyXd2WECm2WkXRgSkh4yjaD1VQpnHqezzTdRDOmdg4GswgWZWgTTerWu/HcV8kD VZnr9bXptZS4FVkR3j8iGMLPNAepjunxuQXnAPfHfHhvb1WPm+kqHFFaDFvP2M77aIML Pd2MN6rqK+hURkTXhIowTMiGpjfiMQ0qRREnoyw96m/l3CGAfLXNS8rUNEoUkRe0JaFF i5ThZfso/dOTXKDzBlZZfBc4WIkFKm9mwzPO601whu1APqeafPwEzLhgfn0tbI8G99GW 0f/A== X-Received: by 10.220.40.212 with SMTP id l20mr7888381vce.29.1370952273167; Tue, 11 Jun 2013 05:04:33 -0700 (PDT) Original-Received: by 10.220.61.196 with HTTP; Tue, 11 Jun 2013 05:04:33 -0700 (PDT) In-Reply-To: <87y5ahkvgg.fsf@thinkpad.tsdh.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74967 Archived-At: --047d7b3a8f683f0d4304dedfb38f Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > Neal Becker 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 > --047d7b3a8f683f0d4304dedfb38f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
When using gs to convert, I do get 3 _different_ png files= .

Using docview, it's really weird. =A0I hit &= #39;g', and answer 'yes'. =A0As I page through, it says pages 1= /3 ... 3/3, but it displays _the same image for all 3 pages!!_. =A0I tried = repeatedly killing buffer, visiting, hitting 'g' to reload - nothin= g I tried seems to fix it.=A0


On Tue,= Jun 11, 2013 at 2:33 AM, Tassilo Horn <tsdh@gnu.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex"> Neal Becker <ndbecker2@gmail.com<= /a>> writes:

Hi Neal,

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

I've tried opening your sample PDF about a dozen times using emac= s 24.3
as well as the current emacs trunk, each version both with -Q and with
my customizations. =A0In 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. =A0To force a reconversion, you can hit `g&#= 39;
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 exi= t
code XX"...

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

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

on the command line.

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

=A0 $ gs -dSAFER -dNOPAUSE -sDEVICE=3Dpng16m -dTextAlphaBits=3D4 \
=A0 =A0 =A0 =A0-dBATCH -dGraphicsAlphaBits=3D4 -dQUIET -sOutputFile=3Ddoc%d= .png \
=A0 =A0 =A0 =A0doc.pdf

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

Bye,
Tassilo

--047d7b3a8f683f0d4304dedfb38f--