I am importing a pdf file to a page using PDFLib. How can I detect if RGB color is used on the objects within the file that I am importing then convert them to CMYK?
Below is my php code.
$p = new PDFlib();
$raw= $p->open_pdi_document($working_folder.$raw_file,"");
$page1= $p->open_pdi_page($raw,1,"");
$p->set_option("errorpolicy=exception");
$p->begin_document("", "");
$p->begin_page_ext(0,0,"width=".$width." height=".$height.")";
$p->fit_pdi_page($page1,0,0,"");
$p->end_document("");`
My goal is to detect RGB colors in $raw and convert them to CMYK when I call fit_pdi_page.