Bug 131421 - Blank page appearing at end of document when converted to PDF via API
Summary: Blank page appearing at end of document when converted to PDF via API
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
Keywords: regression
Depends on:
Reported: 2020-03-19 12:07 UTC by Andy Lanzer
Modified: 2021-03-30 03:40 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:

source odf document (67.11 KB, application/vnd.oasis.opendocument.formula)
2020-03-19 12:07 UTC, Andy Lanzer
source odf for export in LO 5.4 (67.11 KB, application/vnd.oasis.opendocument.formula)
2020-03-19 12:15 UTC, Andy Lanzer
pdf exported with LO 5.4 (72.30 KB, application/pdf)
2020-03-19 12:16 UTC, Andy Lanzer
source odf for export in LO 6.2 (67.11 KB, application/vnd.oasis.opendocument.formula)
2020-03-19 12:17 UTC, Andy Lanzer
pdf exported with LO 6.2 (50.46 KB, application/pdf)
2020-03-19 12:18 UTC, Andy Lanzer
ODF 1 page (65.55 KB, application/vnd.oasis.opendocument.text)
2020-03-20 07:26 UTC, Timur
ODF 1 page compared LO 5.4 and LO 7.0+ (120.70 KB, image/png)
2020-03-20 07:49 UTC, Timur

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Lanzer 2020-03-19 12:07:07 UTC
Created attachment 158798 [details]
source odf document

I have recently upgraded from LibreOffice 5.4 to 6.2.  When we convert a .odf document to PDF a blank page is getting appended in some circumstances.  The blank page does not have a footer on it where we have a footer defined for the document.  With version 5.4 we do not see this behavior.  

The environment in use is
Amazon AWS
Springboot Application
JODConverter with local manager

LibreOffice is used to convert from .odf to .pdf

LibreOffice 5.4.5 run with an Alpine AWS image (3.7)
LibreOffice 6.2 run with an Ubuntu AWS image (Xenial)

Have tested on OSX with LibreOffice 6.6 - No blank page after export
Comment 1 Andy Lanzer 2020-03-19 12:15:44 UTC
Created attachment 158799 [details]
source odf for export in LO 5.4
Comment 2 Andy Lanzer 2020-03-19 12:16:34 UTC
Created attachment 158800 [details]
pdf exported with LO 5.4
Comment 3 Andy Lanzer 2020-03-19 12:17:30 UTC
Created attachment 158801 [details]
source odf for export in LO 6.2
Comment 4 Andy Lanzer 2020-03-19 12:18:16 UTC
Created attachment 158802 [details]
pdf exported with LO 6.2
Comment 5 m.a.riosv 2020-03-19 14:08:02 UTC
I can't repro with the source odf document and
Version: (x64)
Build ID: 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3
CPU threads: 4; OS: Windows 10.0 Build 19582; UI render: GL; VCL: win; 
Locale: es-ES (es_ES); UI-Language: en-US Calc: CL
Comment 6 Timur 2020-03-19 16:21:50 UTC Comment hidden (obsolete)
Comment 7 Andy Lanzer 2020-03-19 16:47:37 UTC Comment hidden (me-too)
Comment 8 Andy Lanzer 2020-03-19 16:48:26 UTC
(In reply to Timur from comment #6)
> (In reply to Andy Lanzer from comment #0)
> > Have tested on OSX with LibreOffice 6.6 - No blank page after export
> Please explain what you meabt by 6.6.
> Did you test master version 7.0+?
> How do you convert, via GUI or with headless?

I am running the convert headless.  
The version I tested on OSX is 6.2.8 (sorry out the incorrect initial )

The environment where the issue occurs is a Docker container deployed to an AWS fargate ecs container.

The application is SpringBoot, JODConverter, and LibreOffice

Have not tested with master version 7.0. 
Due to company policies I am limited to the version of images I am able to build and run with.  I am not able to use an Ubuntu image which support version 7.
Comment 9 Timur 2020-03-19 22:03:57 UTC Comment hidden (obsolete)
Comment 10 Timur 2020-03-20 07:26:17 UTC
Created attachment 158828 [details]
ODF 1 page

There are multiple issues here:

1. Both ODF attachment 158799 [details] and attachment 158801 [details] (should be the same) open as 2 pages in LO 6.2 and 5.4.
I don't know how PDF attachment 158800 [details] from LO 5.4 fits to 1 page. Please explain what happens to the missing "Your discounts" table. 
We cannot test with those. 

2. If we delete "Your discounts" table, we have 1 page ODF in 6.2. 
That file, which I attach here, needs be tested headless in 5.4 and 6.2 Lin. Please confirm if that one saves as 1 or 2 pages PDF for you.
Both Win and Lin need be tested. I now have Win headless but crashes on this file for 5.4 and 6.2 and master that works is not enough.

3.   In the meantime, starting from master 7.0+ this 1 page ODF opens as 2 pages on a system without Roboto font. Opens 1 page if installed.
That would be a separate bug for Roboto replacement. I note for QA who would test.
Comment 11 Timur 2020-03-20 07:49:05 UTC
Created attachment 158829 [details]
ODF 1 page compared LO 5.4 and LO 7.0+

This is a screenshot for issue 3, not part of this bug, but important for testing.
Comment 12 Andy Lanzer 2020-03-20 19:53:39 UTC
The Your Discounts table are hidden and should not be printed.

BTW -  I am trying to get the app we use to run locally in a docker container.  Not done yet but will keep you up to date on my progress
Comment 13 QA Administrators 2020-03-21 02:41:43 UTC Comment hidden (obsolete)
Comment 14 Andy Lanzer 2020-04-01 11:47:42 UTC
I have been able to recreate the issue locally on my mac.  
The results I am seeing are
          Ubuntu        Alpine
5.x          1 page       1 page
6.1.x        1 page       1 page
6.2.x        2 pages      2 pages
6.3.x        Not tested   2 pages
6.4.x        Not tested.  2 pages

Does not seem to be Ubuntu specific.
The change in behavior is between 6.1.x and 6.2.x

Comment 15 Andy Lanzer 2020-04-09 18:37:07 UTC Comment hidden (no-value)
Comment 16 Timur 2020-05-18 11:21:56 UTC
I tried headless in Mint 19 with LO 6.1 up to 7.0+ and couldn't confirm, always 1 page in PDF. 
Note: you may try instdir/program/soffice   --pt PDF  to print to CUPS PDF.
Comment 17 Andy Lanzer 2020-05-18 12:38:44 UTC Comment hidden (obsolete)
Comment 18 Buovjaga 2020-08-30 17:41:08 UTC
(In reply to Andy Lanzer from comment #17)
> Timur,
> This issue only occurs when the conversion is invoked through the API, Java
> in my case.  Have not seen this through the LO application or through
> running it headless.  

So please include full instructions and code to reproduce.
Comment 19 Buovjaga 2020-08-30 17:41:45 UTC
Also, you can bisect this regression yourself: https://wiki.documentfoundation.org/QA/Bibisect
Comment 20 QA Administrators 2021-02-27 04:13:01 UTC Comment hidden (obsolete)
Comment 21 QA Administrators 2021-03-30 03:40:25 UTC
Dear Andy Lanzer,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team