Bug 65725 - FILE_SAVE : Master document export PDF in headless mode doesn't show sub documents page
Summary: FILE_SAVE : Master document export PDF in headless mode doesn't show sub docu...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2013-06-13 18:17 UTC by Arnaud Versini
Modified: 2018-09-15 20:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
testcase (13.98 KB, application/gzip)
2013-07-04 19:35 UTC, Jorendc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud Versini 2013-06-13 18:17:25 UTC
Creta a master document with few pages
Add sub documents with pages
Export soffice --headless --convert-to in command line

Expected behavior : the PDF contains all pages
Result : The PDF contains only contains master document pages
Comment 1 Jorendc 2013-07-04 19:33:26 UTC
I think I can reproduce this bug: converting a 5 page containing odm-file (master document) result in a PDF containing 1 blank page.

Tested using Linux Mint 15 x64 with LibreOffice 4.1.0.1 RC.

Kind regards,
Joren
Comment 2 Jorendc 2013-07-04 19:35:40 UTC
Created attachment 82041 [details]
testcase

This contains 2 documents (1.odt and 2.odt) and 1 master document containing those 2 documents.

* Unpack file
* open terminal
* cd to unpacked folder
* convert headless using: soffice --headless --convert-to PDF masterdoc.odm 

Kind regards,
Joren
Comment 3 Jean-Baptiste Faure 2013-07-13 17:08:28 UTC
I reproduce the problem with Version: 4.1.1.0.0+ (Build ID: 6089121ebd075bb6422d33d6bff69dff2e88efb) even if I configure Writer to automatically update the links on opening the file (it seems this option depends on the file).

Best regards. JBF
Comment 4 QA Administrators 2015-04-01 14:42:16 UTC Comment hidden (obsolete)
Comment 5 Jean-Baptiste Faure 2015-04-12 07:30:17 UTC
Still reproducible. Tested with LibreOffice 4.4.3.0.0+ and master, both built at home under Ubuntu 14.10 x86-64.

Note: under Linux the command line to be used is:
soffice --headless --convert-to pdf masterdoc.odm


Best regards. JBF
Comment 6 Emmanuel DUMAS 2016-04-08 08:23:23 UTC
Still reproducible on Ubuntu 15.10.

$ libreoffice --version
LibreOffice 5.0.5.2 00m0(Build:2)

Exact command :
libreoffice --headless --convert-to pdf --outdir ~/tmp ./XXXXXX.odm


Is-there any tips (script ? intermediate result ?) to avoid this bugs ?
Comment 7 rockorequin 2017-03-15 02:37:04 UTC
This bug is still present in LibreOffice 5.3.0~rc3.

You might be able to do the conversion using unoconv (I'm using v0.7-1.1). unoconv used to suffer from this bug, but it seems to be importing the subdocs correctly when converting to pdf now. (When it used to have the same bug, I used to make unoconv convert the master document to ott first and then to pdf. But now unoconv just converts the master document to a master document with an ott extension if you ask it to do this.) 

I can't use unoconv to convert my master documents, though, because I have a program insert text into the subdocuments, and unoconv doesn't repaginate anymore when doing the conversion so the extra text gets all bunched up at the bottom of the page and is unreadable. So it would be great if soffice could correctly import the subdocs when doing the conversion.
Comment 8 rockorequin 2017-03-15 04:59:53 UTC
I think the bug might actually be in the import filter, because the same bug occurs when converting a master document to a ODT (flat) document - the resulting ODT contains none of the subdocuments.

Re the workaround, unoconv 0.7-1.1 with LibreOffice 5.1 does convert the master document correctly to a PDF, including repagination. "unoconv -f pdf --output=<output file and/or directory> <input filename>" is the command to use.
Comment 9 rockorequin 2017-08-31 06:43:44 UTC
Bug still present in LibreOffice 5.4.0.3 40m0(Build:3).
Comment 10 QA Administrators 2018-09-01 02:41:58 UTC Comment hidden (obsolete)
Comment 11 Jean-Baptiste Faure 2018-09-15 20:37:54 UTC
Still reproducible with LibreOffice 6.1.2.0.0+ built at home under Ubuntu 18.04
x86-64.

Best regards. JBF