[Upstream] Invalid PDF generated on single job collation

Bug #925836 reported by Robert Roth on 2012-02-03
88
This bug affects 15 people
Affects Status Importance Assigned to Milestone
LibreOffice
Fix Released
High
libreoffice (Ubuntu)
Medium
Unassigned

Bug Description

Problem occurs with:
LibreOffice Writer, Calc, Draw 3.5.0 beta2
LibreOffice Writer, Calc, Draw 3.5.1.2

Setting the number of copies in the print dialog doesn't seem to work, regardless of how many copies I want, I only get one listed. I will provide whatever details are required.

1. Launch Writer.
2. Type the word "test".
3. Choose Print and ask for two copies.

What happens: One copy is printed.
What should happen: two copies are printed.

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libreoffice (not installed)
ProcVersionSignature: Ubuntu 3.2.0-12.21-generic-pae 3.2.2
Uname: Linux 3.2.0-12-generic-pae i686
ApportVersion: 1.91-0ubuntu1
Architecture: i386
Date: Fri Feb 3 03:54:16 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120110.2)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: libreoffice
UpgradeStatus: Upgraded to precise on 2012-01-28 (5 days ago)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
linux-man (caldas-lopes) wrote :

Same bug in Write and Calc.
Happens when printing to Cups-PDF and real printers.

Robert Roth (evfool) on 2012-02-16
Changed in libreoffice (Ubuntu):
importance: Undecided → Medium

Robert Roth, thank you for reporting this and helping make Ubuntu better. Could you please attach an example document that when you perform the desired actions, demonstrates this problem?

Changed in libreoffice (Ubuntu):
status: Confirmed → Incomplete
Robert Roth (evfool) wrote :

I have tried with multiple documents, from LibreOffice Draw. I will attach some example documents when I get home, but it seems to be document and application-independent (confirmed by another user in Writer and Calc, see comment 2).
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in libreoffice (Ubuntu):
status: Incomplete → Confirmed
Changed in libreoffice (Ubuntu):
status: Confirmed → Incomplete
linux-man (caldas-lopes) wrote :

Open LibreOffice Writer (blank page). Print Document with multiple copies. Only one page is printed. Tested with CUPS-PDF (no other printer available right now). Rename .libreoffice home folder. Reopen LibreOffice Writer. Try again. Same result.
LibreOffice 3.5.0 350m1(Build:13) Language pt-pt.

Libreoffice Writer doesn't print multiple copies of any document.
Same bug as ...
https://bugs.freedesktop.org/show_bug.cgi?id=33693
... but on linux (Ubuntu 10.04), and with different Libreoffice version.

Printing multiple copies of a document with libreoffice 3.5 installed from ppa does not work. https://launchpad.net/~libreoffice/+archive/ppa
LibreOffice 3.5.0
Build ID: 350m1(Build:13) does not print multiple copies

The version downloaded from www.libreoffice.org prints multiple copies fine for me.
LibreOffice 3.5.0rc3
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735 does print multiple copies

Ubuntu 11.10 x86_64
3.3.0-030300rc4-generic

(In reply to comment #1)
> Printing multiple copies of a document with libreoffice 3.5 installed from ppa
> does not work. https://launchpad.net/~libreoffice/+archive/ppa
> LibreOffice 3.5.0
> Build ID: 350m1(Build:13) does not print multiple copies

I have exact the same problem on my Ubuntu 10.04 64bit.

stefan (stefan-home) wrote :

Had to print 20 copies of a LibreOffice Writer document (conzains only a single page) and had to start 20 print jobs, because choosing multiple copies from the print dialog has had no effect.
But, one time, it works for the same document.
Was running the current beta 1 of Lts 12.04

Same here. I'll attach the document with which I had the problem.

Changed in libreoffice (Ubuntu):
status: Incomplete → New

Additionally from the other bug post https://bugs.freedesktop.org/show_bug.cgi?id=33693#c4,
the issue is the same with version of LibreOffice 3.5.0rc3
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
although it does print multiple copies it sends each copy as a separate print job and that behavior crashes some printers. I don't know if that can be fixed or not.

Weiers (coetserw-gmail) wrote :

Same problem. I have to print 35 copies of a 16 page document with a long edge double sided option. Asking it to print multiple copies has no effect.
(Document attached)

Weiers (coetserw-gmail) wrote :

Note, I suspect this is also associated with this problem. I've tried to send three seperate print commands one after the other (using the large document attached to my previous entry). Only the first print command seems to have made its way into cups. The printer stopped printing after the first document was finished, it waited a while and ejected a blank page.

*** Bug 47131 has been marked as a duplicate of this bug. ***

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Dmitry Shachnev (mitya57) wrote :

Sent upstream.

*** Bug 47361 has been marked as a duplicate of this bug. ***

summary: - printing multiple copies does not work
+ [Upstream] printing multiple copies does not work

Same problem on 12.04 on both 32 & 64 installs .
Same document prints from my 11.10 install but if I select 20 copies it sends it 20 times to the printer.

Changed in df-libreoffice:
importance: Unknown → High
status: Unknown → Confirmed

After updating my LO 3.5.0 to 3.5.1 today via ppa the problem stays the same.

Had the same issue on Precise (12.04) and Lucid (in that last one I use the LibreOffice PPA). Both are using now the LO 3.5.1 and the "number of copies not working bug" occurs every time in real printing (HP desk-jet printer) and in "print to archive".

Just for the record, in Windows 7/32 bits I tested LO 3.5.1 and "print to archive" works with two copies of the same page.

Could some one with this issue try the suggestion from:
http://permalink.gmane.org/gmane.comp.documentfoundation.libreoffice.user/1631

I think this goes back to 2005 & OOo 1.x. When printing, select the
'Options' tab and then select "Create single print jobs for collated
output"

And see if it works?

I can install from ppa some time this week and see if the workaround works.

On LO 3.5.1 it seems that multiple copies aren't printed if booklet mode is set, while they are printed if it's not set.

On my LibreOffice 3.5.1 (on Ubuntu 10.04 64bit, installed over ppa) both workarounds don't work.
To select "Create single print jobs for collated output" has no effect. And if the booklet mode is not set multiple copies of a document arent't printed, too.

description: updated
Raphaël Pinson (raphink) wrote :

Hint for whoever meets this bug and needs to print a lot of documents: export to PDF (not using Cups-PDF, but the PDF export button) and print from your favorite PDF editor.

Pilot6 (hanipouspilot) wrote :

I "fixed" it temprarily by changing default printer language to postscript in /etc/libreoffice/psprint.conf

It seems that defaul PDF language is broken in 3.5.

Is LibreOffice 3.5.1 really the first version in which this does not work?

Also: As this is claimed to be Ubuntu specific in Comment 1 (https://bugs.freedesktop.org/show_bug.cgi?id=46904#c1) -- if so, is there a launchpad bug for this?

Adding regression keyword as this is supposed to be working in 3.3.

it's in 3.5.0 too

Does this persist if you set PSLevel=2 in /etc/libreoffice/psprint.conf ?

Setting PSLevel=2 forces PostScript generation which seems to be ok, while PDF generation is broken. Printing to File shows the same issue.

Steps to reproduce:
1) Have PSLevel=0 (default) in /etc/libreoffice/psprint.conf
2) Create a new document, type "foo"
3) Print, with the following settings:
  - 2 copies
  - print to file
  - do not select "Create single print jobs for each collated output"
4) save to a file foo.pdf
5) open file with evince: it will only have one page and complain similar to:
   Error: May not be a PDF file (continuing anyway)
   Error (2434): Illegal character '{'
   Error: PDF file is damaged - attempting to reconstruct xref table...
   Error: Couldn't find trailer dictionary
   Error: Couldn't read xref table

Just looking for the first time we generated invalid pdf output:
# bad: [4c30602f43475389f81b1d981ce8ee9a3410b9d9] source-hash-85c6244b85b29c1d2bb9d89b62e9512dd65378b5
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [2faf4bc12ab490370d2196dedbc8091f9b09d0a5] source-hash-418a35f4861e863feb39eec73f4a39a87fbcb1f3
git bisect good 2faf4bc12ab490370d2196dedbc8091f9b09d0a5
# good: [b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4] source-hash-ce60138d339a5eb2a174a5d27063249acf2cac42
git bisect good b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4
# good: [216e447cb0a457985f20d4db481fa9c73b0bb775] source-hash-55c5ea43a59e505297fb6fa20b77aaa28f7c67bc
git bisect good 216e447cb0a457985f20d4db481fa9c73b0bb775
# good: [569ab0259fc5fcc3190d9ae9c44e1e28570bc8bd] source-hash-817bf1d41bb07aeb3ed7649d25c2b44ee4acb1fe
git bisect good 569ab0259fc5fcc3190d9ae9c44e1e28570bc8bd
# good: [cfad378ec3c0de9f19525a2eef4cef9bc056e3f6] source-hash-10f977981d2cfb6ba0ccd0185ccb12e212010bc2
git bisect good cfad378ec3c0de9f19525a2eef4cef9bc056e3f6
# good: [a4c1bd2fe1dccc0fa192cc5cf9ebd2967c6a9920] source-hash-558b5ea32a99654dcb63526f107726f7aec4747f
git bisect good a4c1bd2fe1dccc0fa192cc5cf9ebd2967c6a9920

So we started to generate invalid pdf between:

 git log 558b5ea32a99654dcb63526f107726f7aec4747f..85c6244b85b29c1d2bb9d89b62e9512dd65378b5

which incidentally has a lot of dtardon tweaking on printing, thus CC'ing.

summary: - [Upstream] printing multiple copies does not work
+ [Upstream] Invalid PDF generated on single job collation

I think I fixed that last week with fa87093686614d75d63664722de103e47f91c7db .

Changed in df-libreoffice:
status: Confirmed → In Progress
Changed in libreoffice (Ubuntu):
status: Confirmed → Fix Committed

Verified, with the patch applied valid PDF gets generated.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libreoffice - 1:3.5.1-1ubuntu5

---------------
libreoffice (1:3.5.1-1ubuntu5) precise; urgency=low

  * do not use libreoffice-cores unopkg in preinst (LP: #969707)
  * backport dtardons fix for single job collation (LP: #925836)
  * actually install the Ubuntu presentation templates
  * cherry-picked a163c978 from master:
    - make extensions conflicts against libreoffice-core (<< 1:3.5~),
      libreoffice-common (<< 1:3.5~) to (hopefully) help unopkg be working
      when called on upgrades 3.4 -> 3.5 (closes: #666523)
 -- Bjoern Michaelsen <email address hidden> Wed, 04 Apr 2012 14:16:28 +0200

Changed in libreoffice (Ubuntu):
status: Fix Committed → Fix Released

*** Bug 48389 has been marked as a duplicate of this bug. ***

Changed in df-libreoffice:
status: In Progress → Fix Released

In 3.5.2.2 LO Writer can print multiple copies of a document now again.

I've installed LO 3.5.2-2ubuntu1~lucid1, printing multiple copies work fine.

Still can't print mutiple copies with 3.5.2.2 Build ID: 350m1(Build:202) on ArchLinux x86_64.

This is to an HP Laserjet 1100. With or without Collate checked.

If. in the print dialog, I go to Properties->Device and change 'Printer Language Type' from the default PDF to 'Postscript (level from Driver)' multiple copies print OK.

There seems to be no way to change this permanantly. /etc/libreoffice/psprint.conf has PSLevel=0. Changing this to anything else makes no difference.

please don't reopen bugs unless you absolutely know that the problem you're experiencing is the same as the original. File a new one please and try the procedure in comment #14 to see if the output pdf is invalid, and that's your problem, or if its something else which has the same symptoms

(In reply to comment #22)
> please don't reopen bugs unless you absolutely know that the problem you're
> experiencing is the same as the original. File a new one please and try the
> procedure in comment #14 to see if the output pdf is invalid, and that's your
> problem, or if its something else which has the same symptoms

OK. I missed the change of this bug from 'can't print multile copies' to 'PDF printing is broken'.

I will open a new bug.

even if this would be the same bug, it is claimed in comment 18 that the fix has been backported to 3.5.3 -- before reopening, please at least check with a version 3.5.3 or later.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.