Bug#768133: evince won't print landscape PDFs

2015-03-05 Thread Chris Kuehl
Hi Samuel,

On Thu, Mar 05, 2015 at 04:14:35PM +0100, Samuel Wolf wrote:
 is your patch against Evince 3.14.1-1?
 I will build my one Evince version with your patch.
 
 Need only this one, true?
 https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=65;filename=evince-768133.debdiff;att=1;bug=768133

Yes, that's correct. The debdiff is against the current source package
(3.14.1-1) and applies the same fix (namely, reverting a commit which
broke the printing) that upstream already applied.

You can also find binary packages on apt.ocf.berkeley.edu, if that would
be helpful (version 3.14.1-1ocf2).

Chris


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#768133: evince won't print landscape PDFs

2015-03-05 Thread Samuel Wolf
Hi Chris,

is your patch against Evince 3.14.1-1?
I will build my one Evince version with your patch.

Need only this one, true?
https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=65;filename=evince-768133.debdiff;att=1;bug=768133

Samuel


Bug#768133: evince won't print landscape PDFs

2015-02-04 Thread Chris Kuehl
Control: severity -1 grave

Hi again,

I'm going to raise this bug severity, as PDF printing is one of evince's
main features. I think that if we release jessie without PDF printing in
the default desktop, it should be because of a deliberate decision,
rather than because this bug flew under the radar.

Please see my previous mail above for a short summary of the bug. We can
fix it by reverting a single commit, which has already been done by
upstream and Fedora. I provided a debdiff in my last mail.

Many thanks,
Chris


On Mon, Feb 02, 2015 at 05:52:23PM -0800, Chris Kuehl wrote:
 [4] Fedora bug report:
 https://git.gnome.org/browse/evince/commit/?id=69b474fce1a87a0839e1f541f1297492e47c7c31

Sorry, wrong link. Try this one:
https://bugzilla.redhat.com/show_bug.cgi?id=1173832


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#768133: evince won't print landscape PDFs

2015-02-03 Thread Samuel Wolf
Hi all,

2015-02-03 2:52 GMT+01:00 Chris Kuehl cku...@ocf.berkeley.edu:

 Hi all,

 Just wanted to provide some additional context on this bug.

 The current version of evince in jessie/sid will not print landscape
 PDFs (at least, none that I've tried). Instead, the pages print blank.

 It's possible to print the pages by un-checking ``Auto-rotate and
 center'' (which is checked by default), but as expected, the page will
 be oriented and positioned incorrectly, making the print basically
 unusable. I haven't found a way to workaround the bug without resorting
 to something like Okular or command-line tools.

 An evince developer (Carlos Garcia Campos) states on 2015-01-28 in the
 upstream bug [1] [2] [3]:
  Having a proper fix for this is taking more time than I expected, so
  I've just reverted the patch that introduced this regression in both
  branches until we find a proper solution in both Evince and GTK+. This
  is now fixed, use bug #734788 for new discussions or patches to the
  centering option when having a manual scale.

There is also a Fedora bug report [4], where the maintainer reverted the
 commit which caused it.

 So, it seems the best step forward is to follow upstream and Fedora, and
 revert this commit. I've attached a debdiff which reverts it, and tested
 it in our busy computer lab for the past few days successfully.

 Is there any opposition to marking this bug as release-critical? I know
 it's late in the freeze, but I think PDF printing using the default PDF
 viewer on the default DE with the default settings should not be broken
 in jessie, especially since we have an easy fix by reverting the commit
 which caused it. I'm not sure the current severity is appropriate?


I create another bug report [1] since there a more gtk applications
affected and set it to grave.
But it was drop down to important and not release critical [2].

As you write I think it is not a good idea to have a broken landscape
printout with the default DE and Viewer in Debian Jessie.

Samuel

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771205
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771205#21


 I'm happy to help with additional testing.

 Many thanks,
 Chris

 P.S. An easy way to test is to install `printer-driver-cups-pdf`, which
 will show the behavior. ``Print to PDF'' in Evince seems to not. There
 is a PDF attached to Samuel's first email in this thread which can be
 used as a test case.


 [1] Upstream bug report
 https://bugzilla.gnome.org/show_bug.cgi?id=739723

 [2] Upstream revert commit:

 https://git.gnome.org/browse/evince/commit/?id=69b474fce1a87a0839e1f541f1297492e47c7c31

 [3] Commit which was blamed and reverted by upstream and Fedora:

 https://git.gnome.org/browse/evince/commit/?id=ae7a5715131613955a37419b5da1d6d9f3c1cb1d

 [4] Fedora bug report:

 https://git.gnome.org/browse/evince/commit/?id=69b474fce1a87a0839e1f541f1297492e47c7c31



Bug#768133: evince won't print landscape PDFs

2015-02-02 Thread Chris Kuehl
Hi all,

Just wanted to provide some additional context on this bug.

The current version of evince in jessie/sid will not print landscape
PDFs (at least, none that I've tried). Instead, the pages print blank.

It's possible to print the pages by un-checking ``Auto-rotate and
center'' (which is checked by default), but as expected, the page will
be oriented and positioned incorrectly, making the print basically
unusable. I haven't found a way to workaround the bug without resorting
to something like Okular or command-line tools.

An evince developer (Carlos Garcia Campos) states on 2015-01-28 in the
upstream bug [1] [2] [3]:
 Having a proper fix for this is taking more time than I expected, so
 I've just reverted the patch that introduced this regression in both
 branches until we find a proper solution in both Evince and GTK+. This
 is now fixed, use bug #734788 for new discussions or patches to the
 centering option when having a manual scale.

There is also a Fedora bug report [4], where the maintainer reverted the
commit which caused it.

So, it seems the best step forward is to follow upstream and Fedora, and
revert this commit. I've attached a debdiff which reverts it, and tested
it in our busy computer lab for the past few days successfully.

Is there any opposition to marking this bug as release-critical? I know
it's late in the freeze, but I think PDF printing using the default PDF
viewer on the default DE with the default settings should not be broken
in jessie, especially since we have an easy fix by reverting the commit
which caused it. I'm not sure the current severity is appropriate?

I'm happy to help with additional testing.

Many thanks,
Chris

P.S. An easy way to test is to install `printer-driver-cups-pdf`, which
will show the behavior. ``Print to PDF'' in Evince seems to not. There
is a PDF attached to Samuel's first email in this thread which can be
used as a test case.


[1] Upstream bug report
https://bugzilla.gnome.org/show_bug.cgi?id=739723

[2] Upstream revert commit:
https://git.gnome.org/browse/evince/commit/?id=69b474fce1a87a0839e1f541f1297492e47c7c31

[3] Commit which was blamed and reverted by upstream and Fedora:
https://git.gnome.org/browse/evince/commit/?id=ae7a5715131613955a37419b5da1d6d9f3c1cb1d

[4] Fedora bug report:
https://git.gnome.org/browse/evince/commit/?id=69b474fce1a87a0839e1f541f1297492e47c7c31
diff -Nru evince-3.14.1/debian/changelog evince-3.14.1/debian/changelog
--- evince-3.14.1/debian/changelog
+++ evince-3.14.1/debian/changelog
@@ -1,3 +1,10 @@
+evince (3.14.1-1ocf2) UNRELEASED; urgency=medium
+
+  * Add debian/patches/revert-69b474fce1.patch (Closes: #768133)
+- from upstream git, reverts commit which broke landscape printing
+
+ -- Chris Kuehl cku...@ocf.berkeley.edu  Fri, 30 Jan 2015 16:56:46 -0800
+
 evince (3.14.1-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru evince-3.14.1/debian/patches/revert-69b474fce1.patch 
evince-3.14.1/debian/patches/revert-69b474fce1.patch
--- evince-3.14.1/debian/patches/revert-69b474fce1.patch
+++ evince-3.14.1/debian/patches/revert-69b474fce1.patch
@@ -0,0 +1,116 @@
+From: Carlos Garcia Campos carlo...@gnome.org
+Date: Wed, 28 Jan 2015 09:27:17 +0100
+Subject: Revert print-operation: Fix centering of documents when printing 
+ with a manual scale
+
+This reverts commit ae7a5715131613955a37419b5da1d6d9f3c1cb1d.
+
+Fixed the centering of documents when using a manual scale, but it broke
+landscape printing, so reverting until we find a proper fix in both
+Evince and GTK+.
+
+Origin: upstream, https://git.gnome.org/browse/evince/commit/?id=69b474fce1a87a
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=739723
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768133
+
+--- a/libview/ev-print-operation.c
 b/libview/ev-print-operation.c
+@@ -1825,27 +1825,6 @@ _print_context_get_hard_margins (GtkPrin
+ }
+ 
+ static void
+-ev_print_operation_print_get_scaled_page_size (EvPrintOperationPrint *print,
+-   gint   page,
+-   gdouble   *width,
+-   gdouble   *height)
+-{
+-GtkPrintSettings *settings;
+-gdouble   manual_scale;
+-
+-ev_document_get_page_size (EV_PRINT_OPERATION (print)-document,
+-   page, width, height);
+-
+-settings = gtk_print_operation_get_print_settings (print-op);
+-manual_scale = gtk_print_settings_get_scale (settings) / 100.0;
+-if (manual_scale == 1.0)
+-return;
+-
+-*width *= manual_scale;
+-*height *= manual_scale;
+-}
+-
+-static void
+ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
+   GtkPrintContext   *context,
+   gint   page)
+@@ -1855,7 +1834,6 @@