@@ -529,7 +529,11 @@ class Page {
529529 operatorList : opList ,
530530 intent,
531531 } )
532- . then ( function ( [ boundingBoxesByMCID , operationArray , boundingBoxesWithoutMCID ] ) {
532+ . then ( function ( [
533+ boundingBoxesByMCID ,
534+ operationArray ,
535+ boundingBoxesWithoutMCID ,
536+ ] ) {
533537 MCIDBoundingBoxes = boundingBoxesByMCID ;
534538 positionByOperationIndex = operationArray ;
535539 noMCIDBoundingBoxes = boundingBoxesWithoutMCID ;
@@ -573,7 +577,10 @@ class Page {
573577 if ( intent & RenderingIntentFlag . OPLIST ) {
574578 pageOpList . addOp ( OPS . annotBBoxesAndOpPos , [ ] ) ;
575579 pageOpList . addOp ( OPS . operationPosition , positionByOperationIndex ) ;
576- pageOpList . addOp ( OPS . boundingBoxes , [ MCIDBoundingBoxes , noMCIDBoundingBoxes ] ) ;
580+ pageOpList . addOp ( OPS . boundingBoxes , [
581+ MCIDBoundingBoxes ,
582+ noMCIDBoundingBoxes ,
583+ ] ) ;
577584 }
578585 pageOpList . flush ( /* lastChunk = */ true ) ;
579586 return { length : pageOpList . totalLength } ;
@@ -623,22 +630,31 @@ class Page {
623630 canvas = false ;
624631
625632 const annotationsBBoxesAndOperationPosition = [ ] ;
626- for ( const { opList, separateForm, separateCanvas, annotBBoxesAndOpPos } of opLists ) {
633+ for ( const {
634+ opList,
635+ separateForm,
636+ separateCanvas,
637+ annotBBoxesAndOpPos,
638+ } of opLists ) {
627639 pageOpList . addOpList ( opList ) ;
628640
629-
630641 form ||= separateForm ;
631642 canvas ||= separateCanvas ;
632643
633644 annotationsBBoxesAndOperationPosition . push (
634- annotBBoxesAndOpPos ? [
635- annotBBoxesAndOpPos . operationPosition ,
636- annotBBoxesAndOpPos . boundingBoxes ,
637- ] : [ ]
645+ annotBBoxesAndOpPos
646+ ? [
647+ annotBBoxesAndOpPos . operationPosition ,
648+ annotBBoxesAndOpPos . boundingBoxes ,
649+ ]
650+ : [ ]
638651 ) ;
639652 }
640653 if ( intent & RenderingIntentFlag . OPLIST ) {
641- pageOpList . addOp ( OPS . annotBBoxesAndOpPos , annotationsBBoxesAndOperationPosition ) ;
654+ pageOpList . addOp (
655+ OPS . annotBBoxesAndOpPos ,
656+ annotationsBBoxesAndOperationPosition
657+ ) ;
642658 pageOpList . addOp ( OPS . operationPosition , positionByOperationIndex ) ;
643659 pageOpList . addOp ( OPS . boundingBoxes , [
644660 MCIDBoundingBoxes ,
@@ -736,17 +752,14 @@ class Page {
736752
737753 const intentAny = ! ! ( intent & RenderingIntentFlag . ANY ) ,
738754 intentDisplay = ! ! ( intent & RenderingIntentFlag . DISPLAY ) ,
739- intentPrint = ! ! ( intent & RenderingIntentFlag . PRINT ) ;
755+ intentPrint = ! ! ( intent & RenderingIntentFlag . PRINT ) ,
756+ intentOplist = ! ! ( intent & RenderingIntentFlag . OPLIST ) ;
740757
741758 for ( const annotation of annotations ) {
742759 // Get the annotation even if it's hidden because
743760 // JS can change its display.
744761 const isVisible = intentAny || ( intentDisplay && annotation . viewable ) ;
745- if (
746- isVisible ||
747- ( intentPrint && annotation . printable ) ||
748- intent & RenderingIntentFlag . OPLIST
749- ) {
762+ if ( isVisible || ( intentPrint && annotation . printable ) || intentOplist ) {
750763 annotationsData . push ( annotation . data ) ;
751764 }
752765
0 commit comments