1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00
pdf.js/src
Jonas Jenwald e0ae157582 [api-minor] Fix various issues related to the pageSize information
The `getPageSizeInches` method was implemented on `PDFDocumentProxy`, which seems conceptually wrong since the size property isn't global to the document but rather specific to each page. Hence the method is moved into `PDFPageProxy`, as `get pageSizeInches` instead to address this.

Despite the fact that new API functionality was implemented, no unit-tests were added. To prevent issues later on, we should *always* ensure that new functionality has at least some test-coverage; something that this patch also takes care of.

The new `PDFDocumentProperties._parsePageSize` method seemed unnecessary convoluted. Furthermore, in the "no data provided"-case it even returned incorrect data (an array, rather than the expected object).
Finally, the fallback strings didn't actually agree with the `en-US` locale. This inconsistency doesn't look too great, and it's thus addressed here as well.
2018-03-18 09:10:19 +01:00
..
core Attempt to handle corrupt PDF documents that inline Page dictionaries in a Kids array (issue 9540) 2018-03-12 14:13:23 +01:00
display [api-minor] Fix various issues related to the pageSize information 2018-03-18 09:10:19 +01:00
images Vectorize the logo. 2012-10-29 14:08:52 -04:00
shared Implement a single getInheritableProperty utility function 2018-03-03 19:19:39 +01:00
doc_helper.js [api-major] Completely remove the global PDFJS object 2018-03-01 18:13:27 +01:00
license_header.js Replace copyright headers; changes UMD to CommonJS. 2017-02-08 16:35:58 -06:00
license_header_libre.js PDFjs now compatible with Librejs 2017-12-19 15:13:50 +05:30
pdf.js [CRX] Disable fetch in Chrome 60- 2018-03-08 18:27:30 +01:00
pdf.worker.entry.js Enable the --report-unused-disable-directives ESLint command line option 2017-10-15 13:45:12 +02:00
pdf.worker.js Adds Streams API support for networking task of PDF.js project. 2017-07-28 02:32:30 +05:30
worker_loader.js Moves global scope out of shared/util. 2017-08-22 18:20:52 -05:00