Bug 127575 - Writer ODT with embedded scanned PDF image: image does not export to PDF
Summary: Writer ODT with embedded scanned PDF image: image does not export to PDF
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2019-09-16 10:10 UTC by xiphoid
Modified: 2023-09-12 06:45 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample ODT file with PDF embedded (24.13 KB, application/vnd.oasis.opendocument.text)
2019-09-16 10:15 UTC, xiphoid
Details
sample exported PDF file, embedded image not visible (59.68 KB, application/pdf)
2019-09-16 10:17 UTC, xiphoid
Details
pdf image file (82.91 KB, application/pdf)
2019-09-16 23:05 UTC, xiphoid
Details
2nd sample ODT with PDF embedded (32.10 KB, application/vnd.oasis.opendocument.text)
2019-09-16 23:08 UTC, xiphoid
Details
2nd sample exported PDF, embedded image not visible (95.70 KB, application/pdf)
2019-09-16 23:12 UTC, xiphoid
Details
sample document assembled on Windows build 6.3.1.2 with PDF actually embedded (104.41 KB, application/vnd.oasis.opendocument.text)
2019-09-17 00:55 UTC, V Stuart Foote
Details
sample ODT made with LO Writer 6.3.1.2 appimage (106.51 KB, application/vnd.oasis.opendocument.text)
2019-09-19 23:40 UTC, xiphoid
Details
sample exported PDF, embedded PDF img not visible, LO 6.3.1.2 (95.71 KB, application/pdf)
2019-09-19 23:42 UTC, xiphoid
Details
Extracted from attachment 154303 the scanned PDF that will not render into exported PDF (82.91 KB, application/pdf)
2019-09-20 04:08 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xiphoid 2019-09-16 10:10:00 UTC
Description:
Used LO Writer to compose document and inserted PDF image file into Writer ODT file. When ODT file was exported to PDF image was not visible in PDF file produced.

LO 6.0.7.3 installed to Ubuntu 18.04 LTS.

First reported at LO support forums:
https://ask.libreoffice.org/en/question/208689/lo-writer-images-do-not-export-to-pdf/
Reporting this at Mike Kaganski's request.

Steps to Reproduce:
1.Compose document using LO Writer 6.0.7.3.
2.Scan image, edit, crop, save to PDF.
3.Insert image to composed doc.
4.Save doc to ODT file.Image visible in document.
5.Export doc to PDF. Image not visible in PDF file.

Actual Results:
Image not visible when ODT file exported to PDF file.

Expected Results:
Expected image to be visible in exported PDF file.


Reproducible: Always


User Profile Reset: No



Additional Info:
The software should have exported ODT file to PDF and included the embedded PDF file.
Comment 1 xiphoid 2019-09-16 10:15:35 UTC
Created attachment 154188 [details]
sample ODT file with PDF embedded
Comment 2 xiphoid 2019-09-16 10:17:49 UTC
Created attachment 154189 [details]
sample exported PDF file, embedded image not visible
Comment 3 xiphoid 2019-09-16 10:31:07 UTC
Scanner software used was gscan2pdf 2.1.0. Used it to scan and then crop image to desired size. Saved as PDF from gscan2pdf.
Comment 4 V Stuart Foote 2019-09-16 13:31:22 UTC
Unzipping, there are two .PNG images held in the ODT archive's Pictures directory--no PDF.

Maybe not the correct ample document attachment? Or are the scanned imaged really PDF? PNG maybe?

And as noted on Ask thread, on Windows builds Print preview, and Export to PDF do show the signature frame.
Comment 5 xiphoid 2019-09-16 23:05:34 UTC
Created attachment 154204 [details]
pdf image file
Comment 6 xiphoid 2019-09-16 23:08:07 UTC
Created attachment 154205 [details]
2nd sample ODT with PDF embedded
Comment 7 xiphoid 2019-09-16 23:12:24 UTC
Created attachment 154206 [details]
2nd sample exported PDF, embedded image not visible
Comment 8 xiphoid 2019-09-16 23:20:46 UTC
On my Ubuntu 18.04 LTS system I used the following PDF viewing software:
Document Viewer 3.28.4
qpdfview 0.4.18

Embedded PDF image not visible in exported PDF in either software.
Comment 9 V Stuart Foote 2019-09-17 00:50:37 UTC
(In reply to xiphoid from comment #6)
> Created attachment 154205 [details]
> 2nd sample ODT with PDF embedded

Again, there is no embedded PDF. They are PNG, and the content.xml lists the image frame as image/x-vclgraphic; not sure if there is an issue embedding PDF between Linux <--> Windows 

If I replicate the "signature" using the PDF on Windows build of 6.3.1.2 I get the this stanza in content.xml --

<draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="paragraph" svg:x="0.0409in" svg:y="0.1043in" svg:width="1.7398in" svg:height="0.5835in" draw:z-index="0"><draw:image xlink:href="Pictures/10000000000000A700000038F8C2CA3E3C57B71F.pdf" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" loext:mime-type="application/pdf"/><draw:image xlink:href="Pictures/10000000000000A7000000383AAC44F45A8C3941.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" loext:mime-type="image/png"/></draw:frame>

And the pictures directory of the ODF archive holds both the PDF and the PNG frame.  Something is not behaving with your Linux build.
Comment 10 V Stuart Foote 2019-09-17 00:55:26 UTC
Created attachment 154207 [details]
sample document assembled on Windows build 6.3.1.2 with PDF actually embedded

attached...
Comment 11 xiphoid 2019-09-17 01:55:11 UTC
My sample files were created using LO 6.0.7.3 on Ubuntu GNU/linux. You are examining them using LO 6.3.1.2 on Win. That is not exactly the kind apples-with-apples comparison needed to verify the bug. Also, the file you uploaded is an ODT file, not exported PDF containing embedded PDF image. Not sure what you are trying to illustrate with it.

Do you suggest that my Ubuntu GNU/linux build is not behaving with LO? Or that LO 6.0.7.3 is playing up?

LO 6.0.7.3 was installed via system upgrade from Ubuntu 16.04 LTS to 18.04 LTS. I would guess 6.0.7.3 is integrated in the Ubuntu distro ISO file. My system is regularly updated and would have the latest LO version supplied by Cannonical installed.

I haven't changed any LO settings on my system. It is running default settings.

Anyway, I am fortunate there are alternative methods to achieve the embedded image result I desire.
Comment 12 V Stuart Foote 2019-09-17 03:04:44 UTC
(In reply to xiphoid from comment #11)
> My sample files were created using LO 6.0.7.3 on Ubuntu GNU/linux. You are
> examining them using LO 6.3.1.2 on Win. That is not exactly the kind
> apples-with-apples comparison needed to verify the bug. Also, the file you
> uploaded is an ODT file, not exported PDF containing embedded PDF image. Not
> sure what you are trying to illustrate with it.
> 

No, as appropriate I am examining them by unzipping the ODF archive and looking at content the constituent XML and files.
 
> Do you suggest that my Ubuntu GNU/linux build is not behaving with LO? Or
> that LO 6.0.7.3 is playing up?

Simply saying your Linux system is _not_ embedding PDF into the ODF archive. While on a Windows build recent master and 6.3.1.2 it does. Not sure what to make of it...
Comment 13 xiphoid 2019-09-19 23:38:44 UTC
A couple of days ago I downloaded an AppImage of LO 6.3.1.2. AppImages have software bundled up in a no-install package, similar to portable apps for Win environment.
AppImage used was LO 6.3.1.2 fresh standard.
I made additional sample documents using the same processes as done with LO 6.0.7.3. The result was the same: embedded PDF image does not display when ODT file exported as PDF.
Comment 14 xiphoid 2019-09-19 23:40:46 UTC
Created attachment 154303 [details]
sample ODT made with LO Writer 6.3.1.2 appimage
Comment 15 xiphoid 2019-09-19 23:42:52 UTC
Created attachment 154304 [details]
sample exported PDF, embedded PDF img not visible, LO 6.3.1.2
Comment 16 V Stuart Foote 2019-09-20 04:08:57 UTC
Created attachment 154306 [details]
Extracted from attachment 154303 [details] the scanned PDF that will not render into exported PDF

OK, with attachment 154303 [details] ODF archive I now see an embedded PDF. And, an Export to PDF from Writer produces a PDF that will not show the image.

Creating a new document and inserting the extracted PDF as an image likewise will not show the extracted PDF when new document is exported.
 
=-testing-=
Windows 10 Home 64-bit en-US (1903) with
Version: 6.3.1.2 (x64)
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 17 QA Administrators 2021-09-20 03:40:19 UTC Comment hidden (obsolete)
Comment 18 Ezinne 2021-12-30 16:00:33 UTC
This issue is no longer reproducible in:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 9e8c1da64fa8a520730ce0aea0f7199cd75c892f
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 19 Anton Samokat 2022-12-12 20:12:37 UTC
Bug reproduced on Libre Office 7.4.2.3 on Ubuntu 20.04.
Test Case:
- Import to Writer PDF document. 
- Crop and resize created image.
- Export the document as PDF.
- In result PDF images are missing.
Comment 20 Buovjaga 2023-09-12 06:45:20 UTC
attachment 154303 [details] exports fine.

(In reply to Anton Samokat from comment #19)
> Bug reproduced on Libre Office 7.4.2.3 on Ubuntu 20.04.
> Test Case:
> - Import to Writer PDF document. 
> - Crop and resize created image.
> - Export the document as PDF.
> - In result PDF images are missing.

These steps also work fine.

Let's close again.

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f5bcc34580d02f92af01963155f2d54776a5249b
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 12 September 2023