Bug 34204 - Postscript PRINTING cripples particular DRAW object
Summary: Postscript PRINTING cripples particular DRAW object
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.1 RC1
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2011-02-12 01:33 UTC by Rainer Bielefeld Retired
Modified: 2024-09-09 00:32 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Pls. see original report (698.22 KB, application/x-zip-compressed)
2011-02-12 01:34 UTC, Rainer Bielefeld Retired
Details
modified to eliminate gradient in copy of envelope image (118.05 KB, application/vnd.oasis.opendocument.text)
2011-02-14 09:14 UTC, mathog
Details
postscript from modified version, modified envelope looks OK (359.12 KB, application/postscript)
2011-02-14 09:15 UTC, mathog
Details
diagram taken apart to show bug (18.58 KB, application/vnd.oasis.opendocument.graphics)
2011-02-14 10:44 UTC, mathog
Details
taken apart printed to postscript, gradients drawn incorrectly (56.73 KB, application/postscript)
2011-02-14 10:45 UTC, mathog
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Bielefeld Retired 2011-02-12 01:33:20 UTC
Creating a PDF from attached "sampple.odt" from "LibreOffice 3.3.1 RC1 - WIN7  Home Premium (64bit) German UI  [OOO330m19 (build 7 / tag 3.3.1.1)]" using FeePDF XP cripples DRAW object showing an e-mail envelope.

Works fine with LibO PDF export and OOo 3.1.1 + FreePDF

Also a problem wiht OOo3.4-dev + FreePDF

Problem also visible in a postscript file created with "Dell open print Driver PS" when I open "psresult.ps" with GSView4.9 and GS9.0

Please compare view of envelope in sample.odt and various .pdf export results (and in "psresult.ps") in my testkit.zip.

Please ignore problem with missing logo in page header, that seems to be a FreePDF problem.

@mathog:
May be you can try to confirm this problem?
Comment 1 Rainer Bielefeld Retired 2011-02-12 01:34:16 UTC
Created attachment 43285 [details]
Pls. see original report
Comment 2 mathog 2011-02-14 09:13:45 UTC
Confirmed.  The issue seems to be that the gradients mess things up.  In the next two attached files changing the gradient to solid seems to have eliminated the problem.  LibreOffice 3.0.  If I had to guess what the problem was it would be that the gradient objects are generated out of order, so they come out on top of the @ when they shouldn't.  I also observed that in the original sample.odt if the drawing was exported to SVG it was messed up (not shown).
Comment 3 mathog 2011-02-14 09:14:28 UTC
Created attachment 43342 [details]
modified to eliminate gradient in copy of envelope image
Comment 4 mathog 2011-02-14 09:15:33 UTC
Created attachment 43343 [details]
postscript from modified version, modified envelope looks OK

Postscript made by printing to a genicom Cl160 postscript printer, A4 portrait paper, and set "print to file" in options.
Comment 5 Rainer Bielefeld Retired 2011-02-14 09:25:37 UTC
Due to Comment 2 -> NEW

@mathog:
Can you please file a new report concerning the SVG export problem?
Comment 6 mathog 2011-02-14 10:00:51 UTC
SVG export bug reported here

https://bugs.freedesktop.org/show_bug.cgi?id=34264
Comment 7 mathog 2011-02-14 10:44:37 UTC
Created attachment 43347 [details]
diagram taken apart to show bug
Comment 8 mathog 2011-02-14 10:45:59 UTC
Created attachment 43348 [details]
taken apart printed to postscript, gradients drawn incorrectly

The problem is, or at least, part of the problem is, that the gradients are not staying within the LO object when drawn as postscript.  Instead they extend to the rectangular boundary box.
Comment 9 mathog 2011-02-15 08:30:01 UTC
This may be a case of "if you have a hammer, every problem looks like a nail", but...

I know of one big compatibility problem in rendering the same object for Postsript vs. PDF: the latter supports transparency, the former does not.  This also affects PDF output through "Postscript printer" devices on Windows because the program outputs Postscript even though the eventual result is PDF.  Here I think what may be happening is that LO is constructing the envelope flaps via these render operations:

1.  draw layer 1 rectangular gradient
2.  draw layer 2 mask (uses transparency)
3.  draw layer 3 black edge

These are implicit - I did look at these objects and nowhere do they have transparency checked.  When LO tries to send this verbatim to a Postscript device the transparency mask cannot be handled natively by the interface, and LO is probably doing a mixing operation to construct an image when it renders layer 2, which changes the desired shape from that of the mask to that of the gradient.  This probably also explains the odd transparency effects noted in some of the PDF outputs.  There is an image masking operation in Postscript 3

http://partners.adobe.com/public/developer/en/ps/sdk/TN5601.MaskedImages.pdf

and that is probably what should be used instead.  Effectively it is a stencil, either fully opaque or fully transparent, which should suffice for this sort of shaped gradient issue.
Comment 10 mathog 2011-02-15 08:43:42 UTC
The transparency in PDF is handled by Imagetype 103, that in postscript (stencils) by Imagetype 3.  In effect I think LO sees a transparency (even though 100%) knows there is no 103, and fails to fall back to 3.
Comment 11 Björn Michaelsen 2011-12-23 11:51:07 UTC Comment hidden (obsolete)
Comment 12 mathog 2012-01-11 14:35:43 UTC
Problem is still as described in 3.5.0b2.  (on Windows XP).
Comment 13 Florian Reisinger 2012-08-14 14:03:07 UTC Comment hidden (obsolete)
Comment 14 Florian Reisinger 2012-08-14 14:04:03 UTC Comment hidden (obsolete)
Comment 15 Florian Reisinger 2012-08-14 14:08:36 UTC Comment hidden (obsolete)
Comment 16 Florian Reisinger 2012-08-14 14:10:38 UTC Comment hidden (obsolete)
Comment 17 sasha.libreoffice 2012-08-24 08:37:13 UTC
in 3.5.5 still problem. Reopening
Comment 18 bfoman (inactive) 2013-08-14 22:58:51 UTC
Is this still an issue in the latest stable (4.1.x) version?
Comment 19 sasha.libreoffice 2013-08-16 10:07:07 UTC
Reproduced in 4.1.0 on Fedora RFR 64 bit
Steps to reproduce:
0. Open sample.odt file form first attachment
1. Export it as PDF
2. open produced PDF and see on picture of envelope near top of first page
But if we disable option "PDF/A-1a" then it exports correctly.
IMHO it is not a bug. But some improvement is still needed.
Comment 20 QA Administrators 2015-04-01 14:41:30 UTC Comment hidden (obsolete)
Comment 21 Buovjaga 2015-04-23 14:41:19 UTC
Reproduced with NitroPDF.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha1+ (x64)
Build ID: f3375fa07f27bd2ade519af3c07d69040d10eaa9
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-22_23:38:50
Locale: fi_FI
Comment 22 QA Administrators 2016-09-20 09:31:54 UTC Comment hidden (obsolete)
Comment 23 QA Administrators 2019-12-03 13:55:44 UTC Comment hidden (obsolete)
Comment 24 QA Administrators 2021-12-03 04:22:23 UTC Comment hidden (obsolete)
Comment 25 QA Administrators 2023-12-04 03:14:42 UTC Comment hidden (obsolete)
Comment 26 Dave Gilbert 2024-09-09 00:32:03 UTC
Computers got faster in the last 13 years so the performance doesn't stink as much; but you still do have those gradients.  In my recent world it *looks* right in the exportlibo.pdf reloaded.
But yeh it's the 4 linear fills and ellipsoid fill (at the back) and Poppler is converting them into hundreds of elements.