https://bugs.freedesktop.org/show_bug.cgi?id=81065

          Priority: medium
            Bug ID: 81065
          Assignee: [email protected]
           Summary: PRINTING: Print dialog page size is ignored the first
                    time printing in brochure mode
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: 4.1.0.0.alpha1
         Component: Printing and PDF export
           Product: LibreOffice

Created attachment 102451
  --> https://bugs.freedesktop.org/attachment.cgi?id=102451&action=edit
Simple example document

Overview:
When printing in brochure mode, the first attempt at printing sends the wrong
paper size.  In my example, I have letter sized pages that I print on tabloid
sized paper.  The first attempt at printing this way shows an incorrect paper
size and actually sends that incorrect paper size when it creates the job.  The
second time pulling up the print dialog and pressing print works properly.

This is a bug that only really bites us while using brochure printing, since
that seems to be one of the few times setting "page size" in the print dialog
actually changes behavior.  Typically the print dialog's paper size is
completely ignored and the page size is completely determined by the document's
page format.

I only run into this bug in Writer, but I can confirm that it also affects
other components that allow brochure printing, including Draw and Impress.

I'll attach a simple example document with the following properties:
* 4 pages
* half-inch borders (to make page boundaries obvious)
* letter sized page format

Steps to reproduce:

01. Open Example document (or create your own based on criteria above)
02. File -> Print
03. Click "Page Layout" Tab
04. Click "Brochure" radio button
05. Click "General" Tab to return to the first page
06. Click "Properties..."
07. Change "Paper size" to "Tabloid"
08. Change "Orientation" to "Landscape"
09. Click "OK" to close Properties dialog
10. Note that the print preview still shows brochure on letter paper, not
tabloid
11. Click "OK" to print and note resulting print job
12. File -> Print
13. Note that the print preview now shows the correct 17x11 page size we
expected
14. Click "OK" to print and note the resulting print job

* If your printer isn't capable of printing Tabloid, choose any other paper
size.

Expected:
I would expect that both times printing this letter page-formatted document in
brochure mode and specifying tabloid sized paper would result in the document
being printed on tabloid.

Actual:
In step 10, we note that the paper size of the preview is still set to Letter,
not the Tabloid that we specified.  This is exactly what is passed to the
printer the first time, as we can confirm in step 12.  When we revisit the
print dialog again in step 13, the paper size correctly shows Tabloid sized
paper and prints that way.

Notes:
To print one of our common brochure jobs, we specify tabloid size to a
dedicated tabloid tray.  This bug causes LO to instead request letter to the
dedicated tabloid tray, which triggers the printer's page-size mismatch policy
to upscale the letter sized page to tabloid.  This results in an
abomination--the letter aspect ratio, scaled up to fit on tabloid.  Printing a
second time with the same settings sends the job correctly.  Another work
around is to change the settings in File -> "Printer Settings" first.

To prove that the job is actually passing letter sized paper, I changed my
print mode to postscript and enabled print to file.

$ grep PageSize try1.ps
%%IncludeFeature: *PageSize Letter

$ grep PageSize try2.ps
%%IncludeFeature: *PageSize Tabloid

I also tried using "Print to File" using the now-default PDF Print Mode and
observed the same page-size error.  You can view the generated pdf and check
the page properties to verify that the first job specifies Letter sized paper. 

My tests were initially performed using the following LO versions/environments:
LibreOffice 4.2.0.2 under 64bit RHEL6
LibreOffice 4.2.5.2 using 32bit Fedora17
LibreOffice 4.3.0.1RC using 32bit Fedora17
LibreOffice 4.2.5.2 using 64bit Arch Linux

Then I went ahead and bibisected the bug:
315d45609b25edb26f80e4164c6bc9c948143bfc is the first bad commit
commit 315d45609b25edb26f80e4164c6bc9c948143bfc
Author: Bjoern Michaelsen <[email protected]>
Date:   Thu Oct 17 06:49:39 2013 +0000

    source-hash-f160e4935c474a5293b3d3c11b3d538efb4767a0

    commit f160e4935c474a5293b3d3c11b3d538efb4767a0
    Author:     Tor Lillqvist <[email protected]>
    AuthorDate: Mon May 20 14:23:54 2013 +0300
    Commit:     Tor Lillqvist <[email protected]>
    CommitDate: Mon May 20 14:30:50 2013 +0300

        WaE: unused function 'GetAutomaticColor'

        Change-Id: I247d8e0fbfa8c050806a08d2e387d9bc761de534

:100644 100644 bd3ca519fa54a6fe9bdc5c57f9c4d152c1caebc9
0d0cabe76fa1ad7715a96887420426b1ebc018d4 M      ccache.log
:100644 100644 b8e5174ba64f21b3eed701d429c3936e36800bf4
071bdf72b6f793c8634784540032563005c4117d M      commitmsg
:100644 100644 0694ee4d2663349a74dc0c368699203742e46004
8a5795825f81e7357636cf5c3633b692a37dc1e9 M      dev-install.log
:100644 100644 3dee2057c0d1784243699d3e4d8f0af2413e5298
f0e9717218f5f1eeb0d14da99d0b591c298d72b7 M      make.log
:040000 040000 65913d0ac6b1cc964184af567dec2fa039fd3b7f
412f8401b81a5a2a42918f8d46df8dc06b71ef24 M      opt

Bisect log:
# bad: [793dbf6f80f497dfe587d560d6257f42a24273f6]
source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00]
source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [8092559c5013969ebda017d79200463b9b975038]
source-hash-fd84daf696a368c2c7561b5253b32a63ecdeca4a
git bisect good 8092559c5013969ebda017d79200463b9b975038
# bad: [0270ef1b76a6de423b30f7927362cc01c1a0fc38]
source-hash-b1f7dd66b898b03cb4bd8d434b6370310ea95946
git bisect bad 0270ef1b76a6de423b30f7927362cc01c1a0fc38
# good: [aedcb9e93c73792e6d4f6bc5d74050efbe5af7c1]
source-hash-358b60b3b172968a7605b428af01df456d7669b2
git bisect good aedcb9e93c73792e6d4f6bc5d74050efbe5af7c1
# bad: [63ac4ab9665db60fac1e1813c9c80da52b2e87c6]
source-hash-66e39940d763586060c4bcc8c3cd213495c40b79
git bisect bad 63ac4ab9665db60fac1e1813c9c80da52b2e87c6
# good: [ec9e268ce152176463e07e09901e4a99d65d86ee]
source-hash-1b14676b5f95dd51d6266a6ab7bd713a5ddcff2f
git bisect good ec9e268ce152176463e07e09901e4a99d65d86ee
# good: [bf5d7e3794ac23c52e833b6822032f5f11272d0e]
source-hash-a2c34b3d9ac2d7e43e52846308cc63447fd51f23
git bisect good bf5d7e3794ac23c52e833b6822032f5f11272d0e
# good: [5aaaa56b691a456d6c40a20ceca4574681f49634]
source-hash-3fb33e3e04c7f339e1e15d24529e8ea1d4dbe321
git bisect good 5aaaa56b691a456d6c40a20ceca4574681f49634
# good: [5d26e0a77ed0f2b5803dfbd75d9f5eed5ca5cca4]
source-hash-e8ad612bf813579f7a3bd4ed32c719ee01c6ce2e
git bisect good 5d26e0a77ed0f2b5803dfbd75d9f5eed5ca5cca4
# bad: [315d45609b25edb26f80e4164c6bc9c948143bfc]
source-hash-f160e4935c474a5293b3d3c11b3d538efb4767a0
git bisect bad 315d45609b25edb26f80e4164c6bc9c948143bfc
# good: [88f650e02a29e4e7656f1c132f7b47a912a5b8f2]
source-hash-0c45b5548537cffddc3fbdd6b1c2b9a8a1bdbc4a
git bisect good 88f650e02a29e4e7656f1c132f7b47a912a5b8f2
# first bad commit: [315d45609b25edb26f80e4164c6bc9c948143bfc]
source-hash-f160e4935c474a5293b3d3c11b3d538efb4767a0

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to