Skip to main content

OH_Print_RestorePrinterProperties

Function OH_Print_RestorePrinterProperties 

Source
pub unsafe extern "C" fn OH_Print_RestorePrinterProperties(
    printerId: *const c_char,
    propertyKeyList: *const Print_StringList,
) -> Print_ErrorCode
Available on crate features api-12 and print only.
Expand description

This API restores printer properties to default settings based on the list of property keywords.

ohos.permission.PRINT

§Arguments

  • printerId - The id of the printer to be restored.

  • propertyKeyList - The list of property keywords to be restored.

§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: 12