Some test text!

< Web samples

Internationalization: Changing the Language in PDF Viewer

This JavaScript sample lets you change the language displayed in tooltips when viewing documents in PDF Viewer. Compatible with all browsers (including IE10) and mobile devices without using plug-ins. Launch the Internationalization Demo to see an example of how you can toggle between English, French and Chinese Simplified in WebViewer.

Step 1: Get your free trial license key, or sign in

Start Trial
Sign in

Step 2: Add the code:

var viewerElement = document.getElementById('viewer');
var viewer = new PDFTron.WebViewer({
  path: '../../../lib',
  l: window.sampleL,
  pdftronServer: '', // comment this out to do client-side only
  initialDoc: ''
}, viewerElement);

viewerElement.addEventListener('ready', function() {
  var viewerInstance = viewer.getInstance();

  document.getElementById('form').onchange = function(e) {
    // Set language