TomRoush / PdfBox-Android

The Apache PdfBox project ported to work on Android
Apache License 2.0
1.01k stars 259 forks source link

All color are inverted #572

Open francoisnicolas opened 3 months ago

francoisnicolas commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

All the colors are inverted when "render pdf to image"

To reproduce Code snippet to reproduce the behavior:

Add the folowing files in the asset folder another bug : for the file cmb.pdf when we stip the text, many letters change cases : lower to upercase

System.out.println("Hello world");

PDF example Link or attach a PDF demonstrating the issue Download one pdf on the site (file too big for github) : https://www.calameo.com/books/000529009490a941dda5d clic on "LIRE LA PUBLICATION", then download cmb.pdf

Expected behavior A clear and concise description of what you expected to happen.

Actual behavior A clear and concise description of what happened instead.

Environment details:

Android Studio Electric Eel | 2022.1.1 on WINDOWS 11 Build #AI-221.6008.13.2211.9477386, built on January 11, 2023 Runtime version: 11.0.15+0-b2043.56-8887301 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 8 Registry: external.system.auto.import.disabled=true ide.text.editor.with.preview.show.floating.toolbar=false

Result screen : screen1 screen2

Additional context Add any other context about the problem here.

francoisnicolas commented 3 months ago

There is an error message :
E/PdfBox-Android: Unsupported color space kind: COSName{DeviceCMYK}. Will try DeviceRGB instead

same problem is exposed in : https://github.com/TomRoush/PdfBox-Android/issues/483