PDF thumbnails in media-browser get wrong colors

When I upload PDF to media-browser I sometimes get

  1. the PDF symbol as thumbnail
  2. a correct thumbnail of the first page of the PDF (expected result)
  3. a thumbnail of the first page with inverted colors

Result 1 occurs on a different machine then Result 2 and 3 but it is the same sitepackage used.
Result 3: I thought color schema of the PDF could be a problem. But there it does not make any difference between RGB and CMYK documents. Both can get wrong colors. But there are thumbnails that have the correct color.

How can I try to get rid of Result 1 and 3 so that all thumbnails are as expected?

Problem 1 is fixed!

The documentation on Introduction — Neos Media dev-master documentation gave me the hint. My settings for Neos: Imagine were set to GD. This caused result 1 on the development server but on the staging and live server the same setting changed to Imagick which leads to result 2 or result 3. On development server now is result 2 which is fine.

So how to get rid of result 3 on staging and live?

Does nobody have an idea where I could start my search on solving the problem of the wrong/inverted colors?

Check your ghostscript and ImageMagick versions and update maybe. If a PDF has a problem it’s usually one of that.

thx @sebobo for your tipp.

In my development environment I’ve got:

  • ImageMagick V 6.9.10-23
  • Ghostscript V 9.5
    and here is everything fine.

In my Live environment I’ve got:

  • ImageMagick V 6.9.10-68
  • Ghostscript V 9.25
    and here are the wrong colors. Ghostscript is older but there is no newer version for this operating system.

Interesting is that there are several TYPO3 systems as well on the Live server, that don’t have this problem. I tested it with the same PDF. But all NEOS system do have the problem.

Is there a place where I can adapt settings for ImageMagick and Ghostscript?

I just noticed one more strange point:

In media browser there is the same wrong colors. But not for all PDF documents. Some of them are correct and others are not:

When viewing the document in detail view, I get the correct colors:

Then I found out, that this document is rather big: 7 MB. So I opened it in my PDF Software (Drawboard PDF) and saved it with the option reduce size (still 6.7 MB). Then uploaded it again and everything is fine!!

Any hint for this problem?

Saving your PDF with different settings (and/or a different software) fixed the issue. Can you compare the PDF metadata between the working and non-working files?
Some random ideas to look for the culprit:

  • image color space
  • image compression method
  • PDF version

The document that fails is exported as RGB with:
image

The version saved reducing size, doesn’t change the meta information.

Different tools I checked told me that both documents are not PDF/A compliant. Should they be? Which tool should I use to check the documents?