Bug 64594 - text and image loss in PDF to PNG conversion
Summary: text and image loss in PDF to PNG conversion
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-14 16:20 UTC by cp
Modified: 2013-06-17 07:32 UTC (History)
1 user (show)

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


Attachments
original pdf and converted pdf image (759.50 KB, image/png)
2013-05-14 16:20 UTC, cp
Details
this is the original file that gives the problem of parts missing when converted in image (219.61 KB, application/pdf)
2013-05-16 08:54 UTC, cp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cp 2013-05-14 16:20:08 UTC
Created attachment 79311 [details]
original pdf and converted pdf image

Problem description: 
I work in an existing document (created by someone else under windows in word with already a foto and an image in it), where I add some data and add a signature from a file jpg 
Save as odt or doc, there is no difference for the effect.
Convert to pdf pressing the icon "pdf"
The pdf document is ok.
Convert pdf document in image, because the signature must obviously be part of the document and not an image.
In the converted "pdf-image"-document, part of the content (the part written in italic and what's written at the bottom of the page, the already existing image and foto, but not the signature) is missing!
Creating a new document with image in it in libreoffice, nothing of this happens, the converted file is exactly as the original file!
Creating a document with text and foto and other image (jpg and png) in virtual old word and working on it in libre office, everything remains ok. So it must have to do with something that happens on the other persons computer, and I will ask them, but I fear they will know nothing to answer. Apparently their document is perfectly ok when it comes to me by e-mail, so I'm at a loss. Working with that document (saved with other names and other images) in the past in other versions (openoffice), nothing like that happened.

Here's the error-message:
**** Error reading a content stream. The page may be incomplete.
   **** File did not complete the page properly and may be damaged.
   **** Warning: File has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by: 
   **** >>>> LibreOffice 3.6 <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

It was done with some 3.6 version as you see, but it still happens with the new 4.0.3.3, though the new files I created and tried out and which didn't have problems were only done under 4.0.3.3
Operating System: Fedora
Version: 4.0.3.3 release
Comment 1 ign_christian 2013-05-16 06:25:03 UTC
Could you attach your original file? So others can test using same source.
Comment 2 cp 2013-05-16 08:54:41 UTC
Created attachment 79391 [details]
this is the original file that gives the problem of parts missing when converted in image
Comment 3 ign_christian 2013-05-16 10:04:53 UTC
Seems that I don't clearly understand how to reproduce that problem.

I see no problem with your attached pdf. What I did: (correct me if I'm wrong)
1. Open that pdf with PDF-XChange
2. Export to Image (choose jpeg / png)
3. Open the result
4. Exactly same with original pdf (both jpeg & png)

Using LO 4.0.3.3 (Win7 32bit)
Comment 4 cp 2013-05-16 13:17:06 UTC
I'm working under Linux-Fedora.
"convert" is a command of ImageMagick 6.7.7-5 2012-07-18 Q16
http://www.imagemagick.org

As I was told, PDF-Exchange is a closed software that will do everything in its power (and even more...) to visualize also partial corrupted documents.

Try it the way we did:

====================================================
# convert '/home/cornelia/Immagini/Tierschutz/Sternentiere/Marina/Trippy/scheda affido cani asl TRIPPY.pdf' pippo.gif
   **** Error reading a content stream. The page may be incomplete.
   **** File did not complete the page properly and may be damaged.
   **** Warning: File has unbalanced q/Q operators (too many q's)

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> LibreOffice 3.6 <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.
=====================================================

We also tried with PDFTK and it gave the same results:

(pdftk home page permalink: http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
  shortcut: www.pdftk.com)


thank you
Comment 5 ign_christian 2013-05-17 03:32:23 UTC
Hm..probably it's a bug on Imagemagick & PDFTK not doing so? :)

Anyway I can run PDF-Xchange portable from Ubuntu 12.04 through Wine. Maybe you can do so from Fedora?

set status to: UNCONFIRMED -> don't know whether it's an LO bug?
Comment 6 ign_christian 2013-05-17 03:36:59 UTC
(In reply to comment #5)
> Hm..probably it's a bug on Imagemagick & PDFTK not doing so? :)
> 
> Anyway I can run PDF-Xchange portable from Ubuntu 12.04 through Wine. Maybe
> you can do so from Fedora?
> 
> set status to: UNCONFIRMED -> don't know whether it's an LO bug?

Or you could test it using GIMP? As I know GIMP perfectly opens PDF file, then export that file to any image file you want.
Comment 7 cp 2013-05-17 08:12:11 UTC
Thing is, trying another program that in some way manages to do the job, in the end is only some kind of "patch", because it would resolve for this moment my personal problem of needing a converted pdf, but it wouldn't resolve the problem in itself, that MUST be somewhere else...
I tried now with an old document of the same kind, which I transformed - at its time, it was september 2011 -  without problem. Using that SAME document, transforming it NOW in pdf and than in image, I got the same problem as I told (parts missing in image-pdf). I controlled the created pdf with (http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx) and it gave error of non-conformity.
So when it went ok 2 years ago, and now it doesn't any more, there must be some problem, that wasn't there before.
Comment 8 tommy27 2013-06-17 05:51:03 UTC
as it has been told in Comment 5, maybe that's not a LibO bug but rather a bug of the software you use to do the conversion.

if other softwares do the job with no issue it implies that it's not LibO's fault
Comment 9 tommy27 2013-06-17 07:17:28 UTC
tested your .pdf file on Windows 32bit
loaded it into Adobe Acrobat 8 pro
exported it as .png
NO picture loss in the final .png file which looks exactly like the original.

I'm gonna label this as NOTOURBUG seems the issue seems to depend by the .pdf to .png software you use.

feel free to reopen it if you find that the issue is present with any .pdf conversion tools on Linux.
Comment 10 tommy27 2013-06-17 07:32:06 UTC
changed summary to a better explicative description