Browse Source

Fix JS to support more Acrobat versions.

Fixes https://gitlab.com/kicad/code/kicad/issues/12819
7.0
Jeff Young 3 years ago
parent
commit
1b93b8c51b
  1. 4
      common/plotters/PDF_plotter.cpp

4
common/plotters/PDF_plotter.cpp

@ -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 );

Loading…
Cancel
Save