The printingMetrics permission allows a managed ChromeOS extension to get data about printing usage.
This is an enterprise-only and ChromeOS-only permission. It can only be used by extensions that are force-installed by an enterprise policy.
What it does
- Grants access to the
chrome.printingMetricsAPI. - Allows an extension to retrieve information about completed print jobs within the organization.
- This includes data like the printer used, the status of the job, and the number of pages printed.
- The extension can also listen for an event that fires every time a print job is completed.
When to use it
This is for extensions designed for print management and auditing in a corporate or educational setting.
Examples:
- An extension that reports printing data to an administrative dashboard for cost analysis.
- An auditing tool that logs all print jobs for security and compliance purposes.
Manifest Declaration
{
"name": "My Enterprise Print Auditor",
"version": "1.0",
"manifest_version": 3,
"permissions": [
"printingMetrics"
]
}Security & Privacy
Why is it not risky for you?
This is a special permission that only works on ChromeOS computers managed by a company or school IT department. It is designed for corporate environments and will have no effect on your personal computer.
If you see an extension asking for this permission for your personal use, it's likely a mistake or a poorly designed extension, but it does not pose a direct security threat to you because the permission will not function outside of a managed enterprise setting. On a work computer, this permission is used by your IT department to manage device and network settings for administrative and security purposes.
API Usage Example
This example listens for new print jobs and logs their details.
// background.js (on managed ChromeOS)
function setupPrintJobListener() {
if (!chrome.printingMetrics || !chrome.printingMetrics.onPrintJobFinished) {
console.log('Printing Metrics API is not available.');
return;
}
// Listen for when a print job is finished (successfully or not)
chrome.printingMetrics.onPrintJobFinished.addListener((job) => {
console.log('Print job completed:');
console.log(` - Printer ID: ${job.printerId}`);
console.log(` - Job Title: ${job.title}`);
console.log(` - Status: ${job.status}`);
console.log(` - Pages Printed: ${job.numberOfPages}`);
});
console.log('Listening for completed print jobs.');
}
// You might also want to get a list of past jobs
async function getPrintJobs() {
const jobs = await chrome.printingMetrics.getPrintJobs();
console.log('Retrieved saved print jobs:', jobs);
}
setupPrintJobListener();Extensions with the printingMetrics permission
Here are some popular browser extensions that use the "printingMetrics" permission. To explore more, try our Advanced search.