Hi,

You could use PrintTextColors.java from example subproject from the source code download and modify it to get the text colorspace.

For the images, modify the ExtractImages.java from the tool subproject to get the colorspace (drawImage method).

For vector graphics, see this answer

https://stackoverflow.com/questions/38931422/pdfbox-2-0-2-calling-of-pagedrawer-processpage-method-caught-exceptions

you only need fill and stroke, there check the color like in the PrintTextColors.java example.

Try to get these running first, then try to change it. Ask here if you need more support.

It's probably possible to merge the three things into once (because all three extend PDFStreamEngine in some way), but this would be more work. It's probably more important that you get something running.

Tilman



Am 01.07.2020 um 11:35 schrieb zmej serow:
Hi!
I need to know about color separations used in PDF file.
I am sure that all objects in PDF file would be only in CMYK, Pantone or 
Grayscale colorspaces. That is, no RGB nor Lab, nor something else.

If I understand correctly, I have to iterate over all objects and check their 
colors (in case of vector object) or colorspace (in case of raster image 
object).

How can I do this? Would be glad for pointing me to some code examples.
Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to