@@ -13,6 +13,7 @@ import { VercelAnalyticsService } from "../services/vercel-analytics.service";
1313} )
1414export class FeaturesComponent implements OnInit {
1515 @ViewChild ( "pdfViewer" , { static : false } ) public pdfViewer ;
16+ @ViewChild ( "externalBlobViewer" , { static : false } ) public externalBlobViewer ;
1617
1718 // Template references for different spinner styles
1819 @ViewChild ( "defaultSpinnerTemplate" , { static : true } )
@@ -551,6 +552,23 @@ export class FeaturesComponent implements OnInit {
551552 this . currentSourceType = 'string' ;
552553 console . log ( "✅ String pdfSrc set successfully" ) ;
553554 }
555+
556+ public async loadBlobPdfInExternalWindow ( ) {
557+ try {
558+ console . log ( "🧪 Testing Blob pdfSrc loading in external window with urlValidation=false..." ) ;
559+ const response = await fetch ( '/assets/pdfjs/web/compressed.tracemonkey-pldi-09.pdf' ) ;
560+ const blob = await response . blob ( ) ;
561+
562+ // Set blob for the separate external viewer and refresh
563+ this . externalBlobViewer . pdfSrc = blob ;
564+ this . externalBlobViewer . refresh ( ) ;
565+
566+ console . log ( "✅ Blob pdfSrc set successfully for external window:" , blob ) ;
567+ console . log ( "🔍 Check the console of the new window/tab for urlValidation diagnostic logs" ) ;
568+ } catch ( error ) {
569+ console . error ( "❌ Blob loading failed:" , error ) ;
570+ }
571+ }
554572
555573 // Convenience setter demonstrations
556574 public useTraditionalApproach = true ;
0 commit comments