Skip to main content

OH_Print_StartPrintByNative

Function OH_Print_StartPrintByNative 

Source
pub unsafe extern "C" fn OH_Print_StartPrintByNative(
    printJobName: *const c_char,
    printDocCallback: Print_PrintDocCallback,
    context: *mut c_void,
) -> Print_ErrorCode
Available on crate features api-12 and api-13 and print only.
Expand description

This API provide capacity to start print dialog.

ohos.permission.PRINT

§Arguments

  • printJobName - The name of this print job.

  • printDocCallback - The print doc state callback.

  • context - The context of caller app.

§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.

Required System Capabilities: SystemCapability.Print.PrintFramework

Available since API-level: 13