Fix JS to support more Acrobat versions.

Fixes https://gitlab.com/kicad/code/kicad/issues/12819
This commit is contained in:
Jeff Young 2022-11-03 11:55:07 +00:00
parent 2dac73e421
commit 1b93b8c51b
1 changed files with 2 additions and 2 deletions

View File

@ -1214,9 +1214,9 @@ bool PDF_PLOTTER::EndPlot()
js += wxT( "]; " ); js += wxT( "]; " );
js += wxT( "var cChoice = app.popUpMenuEx.apply\\( app, aParams \\); " ); js += wxT( "var cChoice = app.popUpMenuEx.apply\\( app, aParams \\); " );
js += wxT( "if\\( cChoice != null && cChoice.startsWith\\( '#' \\) \\)" js += wxT( "if\\( cChoice != null && cChoice.substring\\( 0, 1 \\) == '#' \\)"
" this.pageNum = cChoice.slice\\( 1 \\); " ); " this.pageNum = cChoice.slice\\( 1 \\); " );
js += wxT( "else if\\( cChoice != null && cChoice.startsWith\\( 'http' \\) \\)" js += wxT( "else if\\( cChoice != null && cChoice.substring\\( 0, 4 \\) == 'http' \\)"
" app.launchURL\\( cChoice \\);" ); " app.launchURL\\( cChoice \\);" );
startPdfObject( menuHandle ); startPdfObject( menuHandle );