mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #3532 from yurydelendik/telem-1
Adds initial telemetry probes
This commit is contained in:
commit
695e92cc00
6 changed files with 237 additions and 3 deletions
|
@ -1020,6 +1020,34 @@ var PDFView = {
|
|||
console.warn('Warning: AcroForm/XFA is not supported');
|
||||
PDFView.fallback();
|
||||
}
|
||||
|
||||
//#if (FIREFOX || MOZCENTRAL)
|
||||
// var versionId = String(info.PDFFormatVersion).slice(-1) | 0;
|
||||
// var generatorId = 0;
|
||||
// var KNOWN_GENERATORS = ["acrobat distiller", "acrobat pdfwritter",
|
||||
// "adobe livecycle", "adobe pdf library", "adobe photoshop", "ghostscript",
|
||||
// "tcpdf", "cairo", "dvipdfm", "dvips", "pdftex", "pdfkit", "itext",
|
||||
// "prince", "quarkxpress", "mac os x", "microsoft", "openoffice", "oracle",
|
||||
// "luradocument", "pdf-xchange", "antenna house", "aspose.cells", "fpdf"];
|
||||
// var generatorId = 0;
|
||||
// if (info.Producer) {
|
||||
// KNOWN_GENERATORS.some(function (generator, s, i) {
|
||||
// if (generator.indexOf(s) < 0) {
|
||||
// return false;
|
||||
// }
|
||||
// generatorId = i + 1;
|
||||
// return true;
|
||||
// }.bind(null, info.Producer.toLowerCase()));
|
||||
// }
|
||||
// var formType = !info.IsAcroFormPresent ? null : info.IsXFAPresent ?
|
||||
// 'xfa' : 'acroform';
|
||||
// FirefoxCom.request('reportTelemetry', JSON.stringify({
|
||||
// type: 'documentInfo',
|
||||
// version: versionId,
|
||||
// generator: generatorId,
|
||||
// formType: formType
|
||||
// }));
|
||||
//#endif
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -1928,6 +1956,12 @@ var PageView = function pageView(container, id, scale,
|
|||
});
|
||||
div.dispatchEvent(event);
|
||||
|
||||
//#if (FIREFOX || MOZCENTRAL)
|
||||
// FirefoxCom.request('reportTelemetry', JSON.stringify({
|
||||
// type: 'pageInfo'
|
||||
// }));
|
||||
// // TODO add stream types report here
|
||||
//#endif
|
||||
callback();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue