Bug 144700 - Transparency in ODT page area bitmap fill is not exported to PDF (comment 11)
Summary: Transparency in ODT page area bitmap fill is not exported to PDF (comment 11)
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2021-09-24 08:20 UTC by Jambunathan K
Modified: 2021-09-25 15:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
example.odt (416.95 KB, application/vnd.oasis.opendocument.text)
2021-09-24 08:25 UTC, Jambunathan K
Details
example.pdf: (128.75 KB, application/pdf)
2021-09-24 08:27 UTC, Jambunathan K
Details
pdf-export-doesnt-match-odt.png: PDF export doesn't match ODT (106.68 KB, image/png)
2021-09-24 08:34 UTC, Jambunathan K
Details
same-page-as-see-in-mupdf-viewer.png: Same page as seen mupdf viewer (94.55 KB, image/png)
2021-09-24 08:38 UTC, Jambunathan K
Details
Bird's eye view of example.odt.png: Bird's eye view of `example.odt` (145.25 KB, image/png)
2021-09-24 11:57 UTC, Jambunathan K
Details
Bird's eye view of example.pdf in evince.png (124.72 KB, image/png)
2021-09-24 12:03 UTC, Jambunathan K
Details
example-latin-only.odt (416.44 KB, application/vnd.oasis.opendocument.text)
2021-09-25 09:34 UTC, Jambunathan K
Details
example-latin-only.pdf (125.06 KB, application/pdf)
2021-09-25 09:35 UTC, Jambunathan K
Details
Bird's eye view of example-latin-only.odt.png (104.82 KB, image/png)
2021-09-25 09:36 UTC, Jambunathan K
Details
Bird's view of example-latin-only.pdf-in-evince.png (121.87 KB, image/png)
2021-09-25 09:37 UTC, Jambunathan K
Details
'StandardPage' page style's preview tab shows the black strip.png (238.54 KB, image/png)
2021-09-25 09:38 UTC, Jambunathan K
Details
Play with Tiling Properties and see MULTIPLE strips appearing.png (237.63 KB, image/png)
2021-09-25 09:39 UTC, Jambunathan K
Details
This is the tiled bitmap image for 'StandardPage' (10.93 KB, image/png)
2021-09-25 09:41 UTC, Jambunathan K
Details
This is the background image for 'OrgTitlePage' (270.29 KB, image/png)
2021-09-25 09:42 UTC, Jambunathan K
Details
This is one another background image embedded in the document, it is of no concern for this bug (103.01 KB, image/png)
2021-09-25 09:43 UTC, Jambunathan K
Details
as a test, here is the background PNG used as a layered image on an ODT canvas (25.56 KB, application/vnd.oasis.opendocument.text)
2021-09-25 15:50 UTC, V Stuart Foote
Details
and to test in Draw canvas, here it is layered between two text boxes (24.06 KB, application/vnd.oasis.opendocument.graphics)
2021-09-25 15:53 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jambunathan K 2021-09-24 08:20:04 UTC
Description:
Summary: What I see in ODT file (LibreOffice UI) is not what I see when I export it to PDF

When I export the attached `example.odt`, I get the attached `example.pdf`.  Visually, the PDF file doesn't match what I see in LibreOffice UI.

See the attached `png` file for what I see in the LibreOffice UI.  Note that there is no "black strip" whatsoever in the ODT file, but somehow the PDF file picks it up.

FWIW, the chapter headings have "hidden" font effects.  I am not sure if that is creating the problem.



Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: c9e5640c8fcad7beb42a66f9bee0252eee9fe323
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-IN (en_IN.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-03-18_08:37:30
Calc: threaded


~$ uname -a
Linux debian 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux


~$ dpkg -l | grep libreoffice
rc  libreoffice7.0-debian-menus                        7.0.0-3                            all          LibreOffice 7.0 desktop integration
ii  libreofficedev7.2                                  7.2.0.0.alpha0-1                   amd64        Brand module for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-base                             7.2.0.0.alpha0-1                   amd64        Base brand module for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-calc                             7.2.0.0.alpha0-1                   amd64        Calc brand module for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-debian-menus                     7.2.0-0                            all          LibreOfficeDev 7.2 desktop integration
ii  libreofficedev7.2-dict-en                          7.2.0.0.alpha0-1                   amd64        En dictionary for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-dict-es                          7.2.0.0.alpha0-1                   amd64        Es dictionary for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-dict-fr                          7.2.0.0.alpha0-1                   amd64        Fr dictionary for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-draw                             7.2.0.0.alpha0-1                   amd64        Draw brand module for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-en-us                            7.2.0.0.alpha0-1                   amd64        Brand language module for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-impress                          7.2.0.0.alpha0-1                   amd64        Impress brand module for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-math                             7.2.0.0.alpha0-1                   amd64        Math brand module for LibreOfficeDev 7.2.0.0.alpha0
ii  libreofficedev7.2-ure                              7.2.0.0.alpha0-1                   amd64        UNO Runtime Environment.0.0.alpha0
ii  libreofficedev7.2-writer                           7.2.0.0.alpha0-1                   amd64        Writer brand module for LibreOfficeDev 7.2.0.0.alpha0
ii  lodevbasis7.2-libreofficekit-data                  7.2.0.0.alpha0-1                   amd64        Libreofficekit data files for LibreOfficeDev 7.2.0.0.alpha0


Steps to Reproduce:
1. Open attached `example.org`
2. Click `Export directly as PDF` icon in the editor window
3. View the PDF file

Actual Results:
`example.pdf` file doesn't visually match the `example.odt`

Expected Results:
`example.pdf` file should visually match the `example.odt`


Reproducible: Always


User Profile Reset: No



Additional Info:
The attached png files show the screenshot of page 3 as seen in LibreOffice UI and as seen in PDF file.
Comment 1 Jambunathan K 2021-09-24 08:25:34 UTC
Created attachment 175234 [details]
example.odt
Comment 2 Jambunathan K 2021-09-24 08:27:19 UTC
Created attachment 175235 [details]
example.pdf:

Where does the back strip come from ..?  Why is some text hidden ...?  Why does the PDF file /differ/ from what I see in LibreOffice UI?
Comment 3 Jambunathan K 2021-09-24 08:34:13 UTC
Created attachment 175236 [details]
pdf-export-doesnt-match-odt.png:  PDF export doesn't match ODT

Screenshots of what I see in LibreOffice UI and what I see in exported PDF.


PDF viewer I am using is

~$ dpkg -l | grep evince
ii  evince                                             40.4-2                             amd64        Document (PostScript, PDF) viewer
ii  evince-common                                      40.4-2                             all          Document (PostScript, PDF) viewer - common files
ii  gir1.2-evince-3.0:amd64                            40.4-2                             amd64        GObject introspection data for the evince libraries
~$
Comment 4 Jambunathan K 2021-09-24 08:38:50 UTC
Created attachment 175237 [details]
same-page-as-see-in-mupdf-viewer.png:  Same page as seen mupdf viewer

Screenshot of one of the problmatic pages as seen in mupdf viewer.


~$ dpkg -l | grep mupdf
ii  mupdf                                              1.17.0+ds1-2                       amd64        lightweight PDF viewer
ii  mupdf-tools                                        1.17.0+ds1-2                       amd64        command line tools for the MuPDF viewer
Comment 5 Jambunathan K 2021-09-24 08:40:40 UTC
Since both `evince` and `mupdf` render `example.pdf` identically, I am inclined to conclude that the problem is NOT with PDF viewer but with the LibreOffice's PDF export.
Comment 6 Jambunathan K 2021-09-24 11:53:42 UTC
This link is for submitter's / my  reference https://github.com/kjambunathan/org-mode-ox-odt/issues/97.  LibreOffice team, please ignore  this comment.
Comment 7 Jambunathan K 2021-09-24 11:57:46 UTC
Created attachment 175246 [details]
Bird's eye view of example.odt.png: Bird's eye view of `example.odt`

Note that there are no `black strips` and all text (save for hidden chapter headings) are visible.  Compare this with what you see in the `example.pdf`.
Comment 8 Jambunathan K 2021-09-24 12:03:24 UTC
Created attachment 175247 [details]
Bird's eye view of example.pdf in evince.png

Compare the bird's eye view of the ODT file and this pdf file.  Do you notice the black strips (which possibly is hiding the text content)
Comment 9 V Stuart Foote 2021-09-24 13:40:48 UTC
No issue with PDF export on Windows build

The PDF subset embeds the same fonts as defined in each of the styles used in the ODT:

SimSun
TimesNewRomanPS-BoldMT
TimesNewRomanPSMT

But the PDF generated on your system shows NotoSerifCJKjp-Bold-VKana as a Type 1 font, suspect that wonky font fall back caused the issue for the 'Content Heading' and then backing of subsequent paragraphs.

=-testing-=

Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 10 Telesto 2021-09-25 00:18:29 UTC
(In reply to V Stuart Foote from comment #9)
> No issue with PDF export on Windows build

Same for me
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d5e55d204b71710eb5eb5d2c683dd6698626df3c
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 11 qiang 2021-09-25 01:38:15 UTC
The black strip is caused by a transparent strip in the background image.
Comment 12 Jambunathan K 2021-09-25 09:25:54 UTC Comment hidden (obsolete)
Comment 13 Jambunathan K 2021-09-25 09:27:57 UTC
I expect the LibreOffice UI and PDF export to be consistent.  I have ruled out non-availability of Asian font and consequent 'font fallback' as part of the problem.

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 14 Jambunathan K 2021-09-25 09:34:01 UTC
Created attachment 175254 [details]
example-latin-only.odt

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 15 Jambunathan K 2021-09-25 09:35:04 UTC
Created attachment 175255 [details]
example-latin-only.pdf

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 16 Jambunathan K 2021-09-25 09:36:30 UTC
Created attachment 175256 [details]
Bird's eye view of example-latin-only.odt.png

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 17 Jambunathan K 2021-09-25 09:37:25 UTC
Created attachment 175257 [details]
Bird's view of example-latin-only.pdf-in-evince.png

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 18 Jambunathan K 2021-09-25 09:38:25 UTC
Created attachment 175258 [details]
'StandardPage' page style's preview tab shows the black strip.png

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 19 Jambunathan K 2021-09-25 09:39:49 UTC
Created attachment 175259 [details]
Play with Tiling Properties and see MULTIPLE strips appearing.png

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 20 Jambunathan K 2021-09-25 09:41:34 UTC
Created attachment 175260 [details]
This is the tiled bitmap image for 'StandardPage'

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 21 Jambunathan K 2021-09-25 09:42:42 UTC
Created attachment 175261 [details]
This is the background image for 'OrgTitlePage'

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 22 Jambunathan K 2021-09-25 09:43:58 UTC
Created attachment 175262 [details]
This is one another background image embedded in the document, it is of no concern for this bug

See https://bugs.documentfoundation.org/show_bug.cgi?id=144700#c12
Comment 23 Jambunathan K 2021-09-25 09:48:51 UTC
(In reply to qiang from comment #11)
> The black strip is caused by a transparent strip in the background image.

You have a workaround to achieving what you want.  That doesn't mean that there is no bug.  

The bug is this: inconsistency between LibreOffice UI and PDF export. I, and for that matter anyone will expect a WYSIWYG when moving between LibreOffice Editor and PDF export. 

What OS are you using?  Is it Windows?  If that is the case, then this is a platform-specific Linux-only bug.

I would appreciate if one another linux-using soul could independently confirm the behaviour I am seeing.
Comment 24 Jambunathan K 2021-09-25 09:57:04 UTC Comment hidden (obsolete)
Comment 25 V Stuart Foote 2021-09-25 15:08:09 UTC
Yep, no font caused impact here.

The black strip *is* mishandling of a transparent strip in the GIMP 2.10.24 generated 10000000000003AC000002C1E6E482E8A2E80086.png image, attachment 175260 [details] [1] used as the tiled bitmap 'Area' of the "StandardPage" Page Style of the affected pages.

Export to PDF gets mishandled differently depending on the os/DE, unnoticeable in Windows based export and preview--but still is mishandled.

=-ref-=
[1] ImageMagick details:

PS C:\Users\vsfoote\downloads> identify -verbose 10000000000003AC000002C1E6E482E8A2E80086.png
Image:
  Filename: 10000000000003AC000002C1E6E482E8A2E80086.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 940x705+0+0
  Resolution: 37x37
  Print size: 25.4054x19.0541
  Units: PixelsPerCentimeter
  Colorspace: sRGB
  Type: TrueColorAlpha
  Base type: Undefined
  Endianness: Undefined
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
    Alpha: 1-bit
  Channel statistics:
    Pixels: 662700
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 242.18 (0.949727)
      median: 255 (1)
      standard deviation: 55.4911 (0.217612)
      kurtosis: 15.0248
      skewness: -4.12153
      entropy: 0.0477442
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 241.914 (0.948681)
      median: 255 (1)
      standard deviation: 56.1885 (0.220347)
      kurtosis: 14.5196
      skewness: -4.06348
      entropy: 0.0463244
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 241.924 (0.94872)
      median: 255 (1)
      standard deviation: 56.1462 (0.220181)
      kurtosis: 14.5225
      skewness: -4.06375
      entropy: 0.0482924
    Alpha:
      min: 0  (0)
      max: 255 (1)
      mean: 242.34 (0.950355)
      median: 255 (1)
      standard deviation: 55.3889 (0.217211)
      kurtosis: 15.195
      skewness: -4.14669
      entropy: 0.284889
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 242.09 (0.949371)
      median: 255 (1)
      standard deviation: 55.8037 (0.218838)
      kurtosis: 14.811
      skewness: -4.09849
      entropy: 0.106812
  Alpha: none   #00000000
  Colors: 343
  Histogram: //truncated for space
    32900: (0,0,0,0) #00000000 none
    ...
//above are the transparent px, below is bg, deleted the rest - vsf
    ...
    628547: (255,255,255,255) #FFFFFFFF white
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: none
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 940x705+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: TopLeft
  Profiles:
    Profile-exif: 2440 bytes
    Profile-icc: 672 bytes
  Properties:
    date:create: 2021-09-25T14:06:06+00:00
    date:modify: 2021-09-24T13:20:56+00:00
    exif:BitsPerSample: 8, 8, 8
    exif:ColorSpace: 1
    exif:DateTime: 2021:09:07 19:05:14
    exif:ExifOffset: 190
    exif:ImageLength: 705
    exif:ImageWidth: 940
    exif:Software: GIMP 2.10.24
    exif:thumbnail:BitsPerSample: 8, 8, 8
    exif:thumbnail:Compression: 6
    exif:thumbnail:ImageLength: 192
    exif:thumbnail:ImageWidth: 256
    exif:thumbnail:JPEGInterchangeFormat: 316
    exif:thumbnail:JPEGInterchangeFormatLength: 2118
    exif:thumbnail:PhotometricInterpretation: 6
    exif:thumbnail:SamplesPerPixel: 3
    icc:copyright: Public Domain
    icc:description: GIMP built-in sRGB
    icc:manufacturer: GIMP
    icc:model: sRGB
    png:bKGD: chunk was found (see Background color, above)
    png:iCCP: chunk was found
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 6
    png:IHDR.color_type: 6 (RGBA)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 940, 705
    png:pHYs: x_res=3701, y_res=3701, units=1
    png:text: 1 tEXt/zTXt/iTXt chunks were found
    png:text-encoded profiles: 1 were found
    png:tIME: 2021-09-07T11:05:14Z
    signature: 0d97bc8be7a72ab4c5a5f48445895007aaff8452be188e861f8fcdf4a59ad6fd
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 11188B
  Number pixels: 662700
  Pixels per second: 70.5443MP
  User time: 0.031u
  Elapsed time: 0:01.009
  Version: ImageMagick 7.0.11-12 Q16 x64 2021-05-09 https://imagemagick.org
Comment 26 V Stuart Foote 2021-09-25 15:50:21 UTC
Created attachment 175269 [details]
as a test, here is the background PNG used as a layered image on an ODT canvas
Comment 27 V Stuart Foote 2021-09-25 15:53:53 UTC
Created attachment 175270 [details]
and to test in Draw canvas, here it is layered between two text boxes

On Windows, get functional transparency in PDF exported from both Writer and Draw canvas--in addition to the export when used as Tiled area fill.

Check to see how the PNG transparency is handled on Export with different os/DE, if it has similar issues to the page area tiled fill.