The print service provides capabilities such as print job management, printer query and configuration, and print extension management. It is applicable to scenarios where apps need to integrate the printing function, manage print jobs, and configure printers, helping developers easily print documents and images.
This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
Generic failure of print.
Possible Causes
This error code indicates a general print exception. Possible causes are as follows:
Solution
Close the print page to release resources and try again. If the error persists, restart the device to reset the print service status. Before calling print-related APIs, ensure that the print service is normal.
Error Message
RPC failure.
Possible Causes
The possible causes are as follows:
Solution
Close the print page to release resources and try again. If the error persists, restart the device to obtain the SA service object again and restore inter-process communication. Before calling print-related APIs, ensure that the SA service object is available and inter-process communication is normal.
Error Message
Failure of print service.
Possible Causes
This error code indicates a print service exception. Possible causes are as follows:
Solution
Close the print page to restart the print service and try again. If the error persists, restart the device to reset the cups service. Before calling print-related APIs, ensure that the print service and cups service are available.
Error Message
Invalid print extension.
Possible Causes
The possible causes are as follows:
Solution
Close the print page to release resources and try again. If the error persists, restart the device to reload the print extension. You are advised to check whether the extension parameters and status are valid before using the print extension.
Error Message
Invalid printer.
Possible Causes
The possible causes are as follows:
Solution
Check whether the printer ID and printer information are correct, and try again. If the query fails, restart the device to reinitialize the cups service. You are advised to verify whether the preceding information is valid before calling print-related APIs.
Error Message
Invalid print job.
Possible Causes
The possible causes are as follows:
Solution
Check whether the print job ID and status are correct, and try again. If the job cannot be found, cancel the current printing operation and initiate printing again. If the issue persists, restart the device to reset the print service. You are advised to verify that the preceding information is correct before performing operations on the print job.