Some test text!
Shows how to call WebViewer constructor to instantiate and load document using WebViewer with WebViewer Server. You can upload local files or load files that are publicly accessible.
Get StartedSamplesDownloadTo run this sample, get started with a free trial of PDFTron SDK.
JavaScript
HTML
WebViewer(
{
path: '../../../lib',
pdftronServer: 'https://demo.pdftron.com/',
initialDoc: 'https://pdftron.s3.amazonaws.com/downloads/pl/demo-annotated.pdf',
},
document.getElementById('viewer')
).then(instance => {
samplesSetup(instance);
document.getElementById('select').onchange = e => {
instance.loadDocument(e.target.value);
};
document.getElementById('file-picker').onchange = e => {
const file = e.target.files[0];
if (file) {
instance.loadDocument(file);
}
};
document.getElementById('url-form').onsubmit = e => {
e.preventDefault();
instance.loadDocument(document.getElementById('url').value);
};
});
Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.
Select a platform to get started with your free trial.
Web
Android
iOS
Windows
Linux
Unlimited usage. No email address required.