diff --git a/examples/text-only/pdf2svg.js b/examples/text-only/pdf2svg.js index 29f0e4ef6..9cdd720bc 100644 --- a/examples/text-only/pdf2svg.js +++ b/examples/text-only/pdf2svg.js @@ -30,7 +30,7 @@ function buildSVG(viewport, textContent) { // processing all items textContent.items.forEach(function (textItem) { - // we have to take in account viewport transform, which incudes scale, + // we have to take in account viewport transform, which includes scale, // rotation and Y-axis flip, and not forgetting to flip text. var tx = PDFJS.Util.transform( PDFJS.Util.transform(viewport.transform, textItem.transform), diff --git a/extensions/firefox/content/PdfJs.jsm b/extensions/firefox/content/PdfJs.jsm index 09d4e34ef..454b1f8b0 100644 --- a/extensions/firefox/content/PdfJs.jsm +++ b/extensions/firefox/content/PdfJs.jsm @@ -266,7 +266,7 @@ var PdfJs = { /** * pdf.js is only enabled if it is both selected as the pdf viewer and if the * global switch enabling it is true. - * @return {boolean} Wether or not it's enabled. + * @return {boolean} Whether or not it's enabled. */ get enabled() { var disabled = getBoolPref(PREF_DISABLED, true); diff --git a/extensions/firefox/content/PdfStreamConverter.jsm b/extensions/firefox/content/PdfStreamConverter.jsm index 5d375bfee..444a2f7b8 100644 --- a/extensions/firefox/content/PdfStreamConverter.jsm +++ b/extensions/firefox/content/PdfStreamConverter.jsm @@ -357,7 +357,7 @@ ChromeActions.prototype = { var result = this.localizedStrings[data]; return JSON.stringify(result || null); } catch (e) { - log('Unable to retrive localized strings: ' + e); + log('Unable to retrieve localized strings: ' + e); return 'null'; } }, diff --git a/make.js b/make.js index a38eeea03..1598f1f04 100644 --- a/make.js +++ b/make.js @@ -366,7 +366,7 @@ target.dist = function() { JSON.stringify(bowerManifest, null, 2)); echo(); - echo('### Commiting changes'); + echo('### Committing changes'); cd(DIST_DIR); var reason = process.env['PDFJS_UPDATE_REASON']; diff --git a/src/core/cff_parser.js b/src/core/cff_parser.js index 2c7578f48..3de7d3495 100644 --- a/src/core/cff_parser.js +++ b/src/core/cff_parser.js @@ -833,7 +833,7 @@ var CFFParser = (function CFFParserClosure() { break; default: - error('Unknow encoding format: ' + format + ' in CFF'); + error('Unknown encoding format: ' + format + ' in CFF'); break; } var dataEnd = pos; @@ -1306,7 +1306,7 @@ var CFFCompiler = (function CFFCompilerClosure() { var globalSubrIndex = this.compileIndex(cff.globalSubrIndex); output.add(globalSubrIndex); - // Now start on the other entries that have no specfic order. + // Now start on the other entries that have no specific order. if (cff.encoding && cff.topDict.hasName('Encoding')) { if (cff.encoding.predefined) { topDictTracker.setEntryLocation('Encoding', [cff.encoding.format], diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 3a97ebbbe..47f5816b1 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -2222,7 +2222,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { // According to the spec if 'FontDescriptor' is declared, 'FirstChar', // 'LastChar' and 'Widths' should exist too, but some PDF encoders seem - // to ignore this rule when a variant of a standart font is used. + // to ignore this rule when a variant of a standard font is used. // TODO Fill the width array depending on which of the base font this is // a variant. var firstChar = (dict.get('FirstChar') || 0); diff --git a/src/core/fonts.js b/src/core/fonts.js index d24cb0a6b..ce28005cb 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -2637,7 +2637,7 @@ var Font = (function FontClosure() { // Naming tables builder.addTable('name', createNameTable(fontName)); - // PostScript informations + // PostScript information builder.addTable('post', createPostTable(properties)); return builder.toArray(); @@ -3014,7 +3014,7 @@ var Type1Font = (function Type1FontClosure() { (pfbHeader[3] << 8) | pfbHeader[2]; } - // Get the data block containing glyphs and subrs informations + // Get the data block containing glyphs and subrs information var headerBlock = getHeaderBlock(file, headerBlockLength); headerBlockLength = headerBlock.length; var headerBlockParser = new Type1Parser(headerBlock.stream, false, diff --git a/src/core/function.js b/src/core/function.js index a6d89032e..4927a35cf 100644 --- a/src/core/function.js +++ b/src/core/function.js @@ -362,7 +362,7 @@ var PDFFunction = (function PDFFunctionClosure() { // clip to domain var v = clip(src[srcOffset], domain[0], domain[1]); - // calulate which bound the value is in + // calculate which bound the value is in for (var i = 0, ii = bounds.length; i < ii; ++i) { if (v < bounds[i]) { break; diff --git a/src/core/image.js b/src/core/image.js index 9f2b68a15..ebd5ce9b7 100644 --- a/src/core/image.js +++ b/src/core/image.js @@ -365,7 +365,7 @@ var PDFImage = (function PDFImageClosure() { i += 8; } - // handle remaing bits + // handle remaining bits if (i < loop2End) { buf = buffer[bufferPos++]; mask = 128; @@ -433,7 +433,7 @@ var PDFImage = (function PDFImageClosure() { width, height); } } else if (isArray(mask)) { - // Color key mask: if any of the compontents are outside the range + // Color key mask: if any of the components are outside the range // then they should be painted. alphaBuf = new Uint8Array(width * height); var numComps = this.numComps; diff --git a/src/core/jpx.js b/src/core/jpx.js index 638cf6a06..f6fe2132c 100644 --- a/src/core/jpx.js +++ b/src/core/jpx.js @@ -1350,13 +1350,13 @@ var JpxImage = (function JpxImageClosure() { var subband = resolution.subbands[j]; var gainLog2 = SubbandsGainLog2[subband.type]; - // calulate quantization coefficient (Section E.1.1.1) + // calculate quantization coefficient (Section E.1.1.1) var delta = (reversible ? 1 : Math.pow(2, precision + gainLog2 - epsilon) * (1 + mu / 2048)); var mb = (guardBits + epsilon - 1); // In the first resolution level, copyCoefficients will fill the - // whole array with coefficients. In the succeding passes, + // whole array with coefficients. In the succeeding passes, // copyCoefficients will consecutively fill in the values that belong // to the interleaved positions of the HL, LH, and HH coefficients. // The LL coefficients will then be interleaved in Transform.iterate(). diff --git a/src/core/murmurhash3.js b/src/core/murmurhash3.js index 292c59f66..32d607059 100644 --- a/src/core/murmurhash3.js +++ b/src/core/murmurhash3.js @@ -33,7 +33,7 @@ var Uint32ArrayView = sharedUtil.Uint32ArrayView; var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) { - // Workaround for missing math precison in JS. + // Workaround for missing math precision in JS. var MASK_HIGH = 0xffff0000; var MASK_LOW = 0xffff; diff --git a/src/core/parser.js b/src/core/parser.js index 12a54002f..cd93beb35 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -742,7 +742,7 @@ var Lexer = (function LexerClosure() { } else if (ch === 0x2D) { // '-' // ignore minus signs in the middle of numbers to match // Adobe's behavior - warn('Badly formated number'); + warn('Badly formatted number'); } else if (ch === 0x45 || ch === 0x65) { // 'E', 'e' // 'E' can be either a scientific notation or the beginning of a new // operator diff --git a/src/display/canvas.js b/src/display/canvas.js index e9b356356..732d2ee9a 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -1813,7 +1813,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { var currentCtx = this.ctx; // TODO non-isolated groups - according to Rik at adobe non-isolated // group results aren't usually that different and they even have tools - // that ignore this setting. Notes from Rik on implmenting: + // that ignore this setting. Notes from Rik on implementing: // - When you encounter an transparency group, create a new canvas with // the dimensions of the bbox // - copy the content from the previous canvas to the new canvas diff --git a/src/display/pattern_helper.js b/src/display/pattern_helper.js index 8691370b7..44f0bdd6d 100644 --- a/src/display/pattern_helper.js +++ b/src/display/pattern_helper.js @@ -170,7 +170,7 @@ var createMeshCanvas = (function createMeshCanvasClosure() { // MAX_PATTERN_SIZE is used to avoid OOM situation. var MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough // We need to keep transparent border around our pattern for fill(): - // createPattern with 'no-repeat' will bleed edges accross entire area. + // createPattern with 'no-repeat' will bleed edges across entire area. var BORDER_SIZE = 2; var offsetX = Math.floor(bounds[0]); diff --git a/src/shared/util.js b/src/shared/util.js index 70119b68f..32492b78d 100644 --- a/src/shared/util.js +++ b/src/shared/util.js @@ -1102,7 +1102,7 @@ function isSpace(ch) { * * @typedef {Object} PromiseCapability * @property {Promise} promise - A promise object. - * @property {function} resolve - Fullfills the promise. + * @property {function} resolve - Fulfills the promise. * @property {function} reject - Rejects the promise. */ @@ -1125,8 +1125,8 @@ function createPromiseCapability() { /** * Polyfill for Promises: * The following promise implementation tries to generally implement the - * Promise/A+ spec. Some notable differences from other promise libaries are: - * - There currently isn't a seperate deferred and promise object. + * Promise/A+ spec. Some notable differences from other promise libraries are: + * - There currently isn't a separate deferred and promise object. * - Unhandled rejections eventually show an error if they aren't handled. * * Based off of the work in: @@ -1308,7 +1308,7 @@ function createPromiseCapability() { * Builds a promise that is resolved when all the passed in promises are * resolved. * @param {array} promises array of data and/or promises to wait for. - * @return {Promise} New dependant promise. + * @return {Promise} New dependent promise. */ Promise.all = function Promise_all(promises) { var resolveAll, rejectAll; diff --git a/test/features/tests.js b/test/features/tests.js index 65d150790..825ddf5a1 100644 --- a/test/features/tests.js +++ b/test/features/tests.js @@ -561,7 +561,7 @@ var tests = [ }, { id: 'Worker-xhr-response', - name: 'XMLHttpRequest supports the reponse property in web workers', + name: 'XMLHttpRequest supports the response property in web workers', run: function () { if (typeof Worker == 'undefined') return { output: 'Skipped', emulated: '' }; diff --git a/web/chromecom.js b/web/chromecom.js index 275c49070..998042976 100644 --- a/web/chromecom.js +++ b/web/chromecom.js @@ -278,7 +278,7 @@ // the PDF file. When the viewer is reloaded or when the user navigates // back and forward, the background page will not observe a HTTP request // with Referer. To make sure that the Referer is preserved, store it in - // history.state, which is preserved accross reloads/navigations. + // history.state, which is preserved across reloads/navigations. var state = window.history.state || {}; state.chromecomState = referer; window.history.replaceState(state, ''); diff --git a/web/debugger.js b/web/debugger.js index 184a713d1..8a049f4c6 100644 --- a/web/debugger.js +++ b/web/debugger.js @@ -578,7 +578,7 @@ var PDFBug = (function PDFBugClosure() { } else { panel.textContent = tool.name + ' is disabled. To enable add ' + ' "' + tool.id + '" to the pdfBug parameter ' + - 'and refresh (seperate multiple by commas).'; + 'and refresh (separate multiple by commas).'; } buttons.push(panelButton); } diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 8386c273a..cef2a4193 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -583,7 +583,7 @@ var PDFPageView = (function PDFPageViewClosure() { }, function(error) { console.error(error); // Tell the printEngine that rendering this canvas/page has failed. - // This will make the print proces stop. + // This will make the print process stop. if ('abort' in obj) { obj.abort(); } else {