I want to use CUPS in iOS for printing and it is mentioned at many places that we can use cups for printing in ios .But when i import library cups/cups.h ,xcode is giving error "cups/cups.h not found".
code i am using in a objective c file :
import <cups/cups.h>
cups_dest_t *dest;
int num_options;
cups_option_t *options;
int job_id;
/* Print a single file */
job_id = cupsPrintFile(dest->name, "/usr/share/cups/data/testprint.ps",
"Test Print", num_options, options);
Do i need to intall some driver or any library to make it work ? or is it the case that CUPS is not available for iOS?
I want to discover printers on worker thread .
My end goal it to do print operation explicitly on worker thread.
In UIkit, UIPrintInteractionController can send the printing job to printer in two ways: ,
- Presenting the printing user interface(using present() func , which can work only with main thread)
- Printing directly to a printer(using print() func , in which we can pass UIPrinter() object containing information about the printer and it can work with worker thread).
Using UIPrinterPickerController , which works on main thread , i can get list of printer . And then do the printing to that printer using method to of UIPrintInteractionController's method 2 of printing from worker thread .
But i want whole printing to be done on worker thread.
By using cups i want to discover the printers using worker thread , so that whole print operation in my application can happen on worker thread.