@@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
123123"use strict" ;
124124
125125
126- var pdfjsVersion = '2.3.13 ' ;
127- var pdfjsBuild = '28326165 ' ;
126+ var pdfjsVersion = '2.3.27 ' ;
127+ var pdfjsBuild = '13ebfec9 ' ;
128128
129129var pdfjsSharedUtil = __w_pdfjs_require__ ( 1 ) ;
130130
@@ -1304,7 +1304,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
13041304
13051305 return worker . messageHandler . sendWithPromise ( 'GetDocRequest' , {
13061306 docId,
1307- apiVersion : '2.3.13 ' ,
1307+ apiVersion : '2.3.27 ' ,
13081308 source : {
13091309 data : source . data ,
13101310 url : source . url ,
@@ -2620,6 +2620,8 @@ class WorkerTransport {
26202620
26212621 if ( intentState . displayReadyCapability ) {
26222622 intentState . displayReadyCapability . reject ( new Error ( data . error ) ) ;
2623+ } else if ( intentState . opListReadCapability ) {
2624+ intentState . opListReadCapability . reject ( new Error ( data . error ) ) ;
26232625 } else {
26242626 throw new Error ( data . error ) ;
26252627 }
@@ -3098,9 +3100,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
30983100 return InternalRenderTask ;
30993101} ( ) ;
31003102
3101- const version = '2.3.13 ' ;
3103+ const version = '2.3.27 ' ;
31023104exports . version = version ;
3103- const build = '28326165 ' ;
3105+ const build = '13ebfec9 ' ;
31043106exports . build = build ;
31053107
31063108/***/ } ) ,
@@ -4903,15 +4905,20 @@ var CanvasGraphics = function CanvasGraphicsClosure() {
49034905 consumePath = typeof consumePath !== 'undefined' ? consumePath : true ;
49044906 var ctx = this . ctx ;
49054907 var strokeColor = this . current . strokeColor ;
4906- ctx . lineWidth = Math . max ( this . getSinglePixelWidth ( ) * MIN_WIDTH_FACTOR , this . current . lineWidth ) ;
49074908 ctx . globalAlpha = this . current . strokeAlpha ;
49084909
49094910 if ( strokeColor && strokeColor . hasOwnProperty ( 'type' ) && strokeColor . type === 'Pattern' ) {
49104911 ctx . save ( ) ;
4912+ let transform = ctx . mozCurrentTransform ;
4913+
4914+ const scale = _util . Util . singularValueDecompose2dScale ( transform ) [ 0 ] ;
4915+
49114916 ctx . strokeStyle = strokeColor . getPattern ( ctx , this ) ;
4917+ ctx . lineWidth = Math . max ( this . getSinglePixelWidth ( ) * MIN_WIDTH_FACTOR , this . current . lineWidth * scale ) ;
49124918 ctx . stroke ( ) ;
49134919 ctx . restore ( ) ;
49144920 } else {
4921+ ctx . lineWidth = Math . max ( this . getSinglePixelWidth ( ) * MIN_WIDTH_FACTOR , this . current . lineWidth ) ;
49154922 ctx . stroke ( ) ;
49164923 }
49174924
@@ -5908,17 +5915,32 @@ exports.TilingPattern = void 0;
59085915var _util = __w_pdfjs_require__ ( 1 ) ;
59095916
59105917var ShadingIRs = { } ;
5918+
5919+ function applyBoundingBox ( ctx , bbox ) {
5920+ if ( ! bbox || typeof Path2D === 'undefined' ) {
5921+ return ;
5922+ }
5923+
5924+ const width = bbox [ 2 ] - bbox [ 0 ] ;
5925+ const height = bbox [ 3 ] - bbox [ 1 ] ;
5926+ const region = new Path2D ( ) ;
5927+ region . rect ( bbox [ 0 ] , bbox [ 1 ] , width , height ) ;
5928+ ctx . clip ( region ) ;
5929+ }
5930+
59115931ShadingIRs . RadialAxial = {
59125932 fromIR : function RadialAxial_fromIR ( raw ) {
59135933 var type = raw [ 1 ] ;
5914- var colorStops = raw [ 2 ] ;
5915- var p0 = raw [ 3 ] ;
5916- var p1 = raw [ 4 ] ;
5917- var r0 = raw [ 5 ] ;
5918- var r1 = raw [ 6 ] ;
5934+ var bbox = raw [ 2 ] ;
5935+ var colorStops = raw [ 3 ] ;
5936+ var p0 = raw [ 4 ] ;
5937+ var p1 = raw [ 5 ] ;
5938+ var r0 = raw [ 6 ] ;
5939+ var r1 = raw [ 7 ] ;
59195940 return {
59205941 type : 'Pattern' ,
59215942 getPattern : function RadialAxial_getPattern ( ctx ) {
5943+ applyBoundingBox ( ctx , bbox ) ;
59225944 var grad ;
59235945
59245946 if ( type === 'axial' ) {
@@ -6146,10 +6168,12 @@ ShadingIRs.Mesh = {
61466168 var figures = raw [ 4 ] ;
61476169 var bounds = raw [ 5 ] ;
61486170 var matrix = raw [ 6 ] ;
6171+ var bbox = raw [ 7 ] ;
61496172 var background = raw [ 8 ] ;
61506173 return {
61516174 type : 'Pattern' ,
61526175 getPattern : function Mesh_getPattern ( ctx , owner , shadingFill ) {
6176+ applyBoundingBox ( ctx , bbox ) ;
61536177 var scale ;
61546178
61556179 if ( shadingFill ) {
@@ -6390,18 +6414,14 @@ function makeReasonSerializable(reason) {
63906414 return new _util . UnknownErrorException ( reason . message , reason . toString ( ) ) ;
63916415}
63926416
6393- function resolveOrReject ( capability , success , reason ) {
6394- if ( success ) {
6417+ function resolveOrReject ( capability , data ) {
6418+ if ( data . success ) {
63956419 capability . resolve ( ) ;
63966420 } else {
6397- capability . reject ( reason ) ;
6421+ capability . reject ( wrapReason ( data . reason ) ) ;
63986422 }
63996423}
64006424
6401- function finalize ( promise ) {
6402- return Promise . resolve ( promise ) . catch ( ( ) => { } ) ;
6403- }
6404-
64056425function MessageHandler ( sourceName , targetName , comObj ) {
64066426 this . sourceName = sourceName ;
64076427 this . targetName = targetName ;
@@ -6686,19 +6706,19 @@ MessageHandler.prototype = {
66866706
66876707 let deleteStreamController = ( ) => {
66886708 Promise . all ( [ this . streamControllers [ data . streamId ] . startCall , this . streamControllers [ data . streamId ] . pullCall , this . streamControllers [ data . streamId ] . cancelCall ] . map ( function ( capability ) {
6689- return capability && finalize ( capability . promise ) ;
6709+ return capability && capability . promise . catch ( function ( ) { } ) ;
66906710 } ) ) . then ( ( ) => {
66916711 delete this . streamControllers [ data . streamId ] ;
66926712 } ) ;
66936713 } ;
66946714
66956715 switch ( data . stream ) {
66966716 case 'start_complete' :
6697- resolveOrReject ( this . streamControllers [ data . streamId ] . startCall , data . success , wrapReason ( data . reason ) ) ;
6717+ resolveOrReject ( this . streamControllers [ data . streamId ] . startCall , data ) ;
66986718 break ;
66996719
67006720 case 'pull_complete' :
6701- resolveOrReject ( this . streamControllers [ data . streamId ] . pullCall , data . success , wrapReason ( data . reason ) ) ;
6721+ resolveOrReject ( this . streamControllers [ data . streamId ] . pullCall , data ) ;
67026722 break ;
67036723
67046724 case 'pull' :
@@ -6757,7 +6777,7 @@ MessageHandler.prototype = {
67576777 break ;
67586778
67596779 case 'cancel_complete' :
6760- resolveOrReject ( this . streamControllers [ data . streamId ] . cancelCall , data . success , wrapReason ( data . reason ) ) ;
6780+ resolveOrReject ( this . streamControllers [ data . streamId ] . cancelCall , data ) ;
67616781 deleteStreamController ( ) ;
67626782 break ;
67636783
0 commit comments