I was trying to convert .doc files to pdf files the reference at Convert Word doc, docx and Excel xls, xlsx to PDF with PHP, and successfull to convert to pdf,,, when i detect total ink coverage with ghost script the result fil value for CMYK in same value like,,,
PAGE 1
0.8557 0.8557 0.8557 0.8557 CMYK OK
The correct result is
PAGE 1
0.0000 0.0000 0.0000 1.0000 CMYK OK
because my file contain all black font
`My php script for convert to pdf`
$result = exec('"C:\Program Files (x86)\OpenOffice 4\program\python.exe"
D:\wamp\www\doc_to_pdf\libobasis4.4-pyuno\unoconv -f pdf -o
D:/wamp/www/doc_to_pdf/files/'.$pdf_File_name.'
D:/wamp/www/doc_to_pdf/files/'.$doc_file_name);
my ghost script
-o - -sDEVICE=inkcov E:/fileconverted.pdf
BTW i use openoffice and unoconv
You may think that your file contains black text only, and indeed it probably does in a sense, but....
Because you used a word processor instead of a graphics arts application, the text colour is almost certainly specified in an RGB colour space. So if you asked for 50% green text you wouldn't get 50% Cyan, 50% Yellow, 0% Magenta and 0% Black, what you get is 0% Red, 50% Green and 0% Blue. This is because the operating system, which is after all driving an RGB monitor, works in RGB space.
For black text (R=G=B=0), when you convert that to CMYK it does not become C=M=Y=0, K=1. This is a well known problem with colour space conversion.
So in short, what you see is correct, the problem is with your expectation.
I would imagine that the PDF files you have created specify the colour of the text in RGB as well. When you use the inkcov device this causes Ghostswcript to convert the RGB into CMYK, using the standard PostScript/PDF conversion algorithm. The standard conversion from RGB to CMYK is given on page 476 of the PostScript Language Reference Manual.
There are other ways to deal with this conversion, but its complicated and I would need to know why you want the CMYK ink coverage before making any recommendations.
Of course, since you haven't posted an example file to study, this is all speculation. If you would care to make an example available I will look at it and check.
[after viewing file]
Yep, all the colour is specified in DeviceRGB.
Not only that, but each page defines a transparency group, with a blending space of RGB. So even if the text was drawn in CMYK, it would be converted into RGB for the transparency blending. Yes I know that the file doesn't have any transparent objects, but a lot of not terribly bright PDF producers emit transparency groups even when they don't actually use any transparent content. Anything using Cairo is particularly susceptible to this.
So basically, what Ghostscript's inkcov device is telling you is correct and its a consequence of the fact that your content is in RGB.
Now if you'll tell me why this is a problem, I might be able to help. Though given that presence of the transparency group, that may be difficult.