11import {
22 OPS , Util , IDENTITY_MATRIX
3- } from '../shared/util' ;
3+ } from '../shared/util.js ' ;
44import {
55 StateManager ,
66 TextState
7- } from "./evaluator" ;
8- import { isDict } from "./primitives" ;
7+ } from "./evaluator.js " ;
8+ import { isDict } from "./primitives.js " ;
99
1010var BoundingBoxesCalculator = ( function PartialEvaluatorClosure ( ) {
1111 function BoundingBoxesCalculator ( ignoreCalculations ) {
12+ console . log ( 'HELOOOOOOOOOOOOOOOOOOOOOOOOOOO' ) ;
1213 this . textStateManager = new StateManager ( new TextState ( ) ) ;
1314 this . graphicsStateManager = new StateManager ( new GraphicsState ( ) ) ;
1415 this . clipping = false ;
@@ -59,11 +60,11 @@ var BoundingBoxesCalculator = (function PartialEvaluatorClosure() {
5960 [ tx0 , ty0 ] = Util . applyTransform ( [ 0 , descent + rise ] , this . textStateManager . state . textMatrix ) ;
6061 //Calculate transformed height and shift to place whole glyph inside of bbox
6162 shift = [ tx0 - this . textStateManager . state . textMatrix [ 4 ] , ty0 - this . textStateManager . state . textMatrix [ 5 ] ] ;
62- height = Util . applyTransform ( [ 0 , ascent - descent ] , this . textStateManager . state . textMatrix ) ;
63+ height = Util . applyTransform ( [ 0 , ascent - descent ] , this . textStateManager . state . textMatrix ) ;
6364 } else {
6465 [ tx0 , ty0 ] = Util . applyTransform ( [ - this . textStateManager . state . fontSize / 2 , rise ] , this . textStateManager . state . textMatrix ) ;
6566 shift = [ tx0 - this . textStateManager . state . textMatrix [ 4 ] , ty0 - this . textStateManager . state . textMatrix [ 5 ] ] ;
66- height = Util . applyTransform ( [ ascent - descent , 0 ] , this . textStateManager . state . textMatrix ) ;
67+ height = Util . applyTransform ( [ ascent - descent , 0 ] , this . textStateManager . state . textMatrix ) ;
6768 }
6869 height [ 0 ] -= this . textStateManager . state . textMatrix [ 4 ] ;
6970 height [ 1 ] -= this . textStateManager . state . textMatrix [ 5 ] ;
@@ -713,7 +714,7 @@ var BoundingBoxStack = (function BoundingBoxStack() {
713714var NoMCIDBoundingBoxStack = ( function NoMCIDBoundingBoxStack ( ) {
714715 function NoMCIDBoundingBoxStack ( ) {
715716 this . boundingBoxesStack = new BoundingBoxStack ( ) ;
716- this . contentCounter = null ;
717+ this . contentCounter = null ;
717718 this . content = { } ;
718719 this . pointer = { } ;
719720 }
@@ -732,7 +733,7 @@ var NoMCIDBoundingBoxStack = (function NoMCIDBoundingBoxStack() {
732733
733734 save : function NoMCIDBoundingBoxStack_save ( x , y , w , h ) {
734735 if ( this . pointer . contentItems ) {
735- this . pointer . contentItems . push ( {
736+ this . pointer . contentItems . push ( {
736737 contentItem : { x, y, w, h }
737738 } ) ;
738739 this . pointer . final = true ;
@@ -761,7 +762,7 @@ var NoMCIDBoundingBoxStack = (function NoMCIDBoundingBoxStack() {
761762 this . content [ this . contentCounter . index ] = { parent : this . content , contentItems : [ ] } ;
762763 this . pointer = this . content [ this . contentCounter . index ] ;
763764 } else if (
764- this . contentCounter . inMarkedContent !== false && isMC ||
765+ this . contentCounter . inMarkedContent !== false && isMC ||
765766 ! ! this . contentCounter . inMarkedContent === isMC && ! Object . keys ( this . pointer ) . length
766767 ) {
767768 delete this . content [ this . contentCounter . index ] . parent ;
0 commit comments