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 17:19:59 +00:00
parent 2dac73e421
commit 1b93b8c51b
+2 -2
View File
@@ -1214,9 +1214,9 @@ bool PDF_PLOTTER::EndPlot()
js += wxT( "]; " );
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 \\); " );
js += wxT( "else if\\( cChoice != null && cChoice.startsWith\\( 'http' \\) \\)"
js += wxT( "else if\\( cChoice != null && cChoice.substring\\( 0, 4 \\) == 'http' \\)"
" app.launchURL\\( cChoice \\);" );
startPdfObject( menuHandle );