From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#12506: 24.2.50; Docview shrinks width to fit screen Date: Tue, 25 Sep 2012 10:39:39 +0200 Message-ID: <871uhqebsk.fsf@thinkpad.tsdh.de> References: <3B2F4906-4358-4789-8168-594D8D8337A2@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1348562418 28771 80.91.229.3 (25 Sep 2012 08:40:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2012 08:40:18 +0000 (UTC) Cc: 12506@debbugs.gnu.org To: Ivan Andrus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 25 10:40:22 2012 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 1TGQgm-0007sC-2Q for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2012 10:40:20 +0200 Original-Received: from localhost ([::1]:58064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGQgh-00046H-2y for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2012 04:40:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGQgd-000460-C0 for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2012 04:40:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGQgX-00069k-AJ for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2012 04:40:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGQgX-00068F-6P for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2012 04:40:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TGQiQ-00061U-7j for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2012 04:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Sep 2012 08:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12506-submit@debbugs.gnu.org id=B12506.134856250623130 (code B ref 12506); Tue, 25 Sep 2012 08:42:02 +0000 Original-Received: (at 12506) by debbugs.gnu.org; 25 Sep 2012 08:41:46 +0000 Original-Received: from localhost ([127.0.0.1]:54436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGQi9-000610-BA for submit@debbugs.gnu.org; Tue, 25 Sep 2012 04:41:46 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:47678) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGQi6-00060s-0k for 12506@debbugs.gnu.org; Tue, 25 Sep 2012 04:41:43 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id AB5A3D2226; Tue, 25 Sep 2012 10:39:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ml3c8Uasqvne; Tue, 25 Sep 2012 10:39:41 +0200 (CEST) X-CHKRCPT: Envelopesender noch tsdh@gnu.org Original-Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id DD33CD2234; Tue, 25 Sep 2012 10:39:41 +0200 (CEST) In-Reply-To: <3B2F4906-4358-4789-8168-594D8D8337A2@gmail.com> (Ivan Andrus's message of "Mon, 24 Sep 2012 20:17:37 +0200") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:64869 Archived-At: Ivan Andrus writes: > I occasionally use doc-view-mode to read pdfs. I have noticed that if > the window is skinnier than the width of the pdf then the width is > shrunk so that it all fits. However, the height is not affected. > This leads to "squished" text which is unreadable. > > To see the effect: > > 1. emacs -Q > 2. open a pdf in doc-view-mode > 3. type "W" for `doc-view-fit-width-to-window' > 4. C-x 3 to split the window > 5. You now have a squished picture. > > I think it should not scale the width at all (and it did not use to). > It makes zooming in impossible. Especially it should not scale the > width without scaling the height. I can't reproduce that on a GNU/Linux box. After step 3, the image fits exactly the width of the emacs window and the height is set correctly to keep the aspect ratio. After step 4, I have two side-by-side windows, each showing about the left half of the image, but no squishing. Have you compiled emacs with ImageMagick support? I guess so, because else doc-view would fall back to reconversion with any zooming command. So let's assume you have ImageMagick support, could you please evaluate ;; That's basically what doc-view with ImageMagic does when ;; fitting/zooming (insert-image (create-image "/some/image.png" 'imagemagick nil :width 100)) and play a bit with the width parameter? In any case, the image should keep its original aspect ratio. ,----[ (info "(elisp)ImageMagick Images") ] | `:width, :height' | The `:width' and `:height' keywords are used for scaling the | image. If only one of them is specified, the other one will be | calculated so as to preserve the aspect ratio. If both are | specified, aspect ratio may not be preserved. `---- If you don't have ImageMagick support, could you check if just finding some png image with image-mode and then splitting has the same squish effect? Bye, Tassilo