0

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.

richardwhatever
  • 4,564
  • 5
  • 23
  • 26
  • Are you asking about Browser cookies? Are you using PDFTron WebViewer? Or are you simply asking about PDFViewCtrl and mentioning cookies for illustrative purposes? What platforms are you asking about? – Ryan Dec 02 '14 at 19:32
  • Hi Ryan, I've updated question, hopefully answering your questions – richardwhatever Dec 03 '14 at 10:00

1 Answers1

1

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.

mparizeau
  • 663
  • 5
  • 12