Does PdfTron have built in options for saving viewing settings in a cookie?

111 views Asked by At

Is there a quick convenient way to save viewing options to a browser cookie so that users viewing various documents on PDFTron Web Viewer across the same site can view them in a consistent manner of their liking?

Thanks.

1

There are 1 answers

0
mparizeau On

There isn't a built in way to do this with WebViewer but you could probably implement this fairly easily with cookies or localstorage.

You could store the options object (new PDFTron.WebViewer(options, viewerElement) for maintaining settings (without initialDoc). Then you just check whether there are stored options otherwise use the default options. Of course you could store any additional settings you have in the same way.