Skip to main content

OH_Print_StartPrintJob

Function OH_Print_StartPrintJob 

Source
pub unsafe extern "C" fn OH_Print_StartPrintJob(
    printJob: *const Print_PrintJob,
) -> Print_ErrorCode
Available on crate features api-12 and print only.
Expand description

This API starts initiating a print job.

ohos.permission.PRINT

§Arguments

  • printJob - A pointer to a Print_PrintJob instance that specifies the information for the print job.

§Returns

  • Returns Print_ErrorCode if the execution is successful. [PRINT_ERROR_NO_PERMISSION] The permission ohos.permission.PRINT is needed. [PRINT_ERROR_RPC_FAILURE] Unable to connect to the print service. [PRINT_ERROR_INVALID_PRINTER] The printer should be in the list of connected printers. [PRINT_ERROR_SERVER_FAILURE] Unable to create print job in the print service. [PRINT_ERROR_INVALID_PRINT_JOB] Unable to find the job int the job queue.

Required System Capabilities: SystemCapability.Print.PrintFramework

Available since API-level: 12