Open PDF as read only

In Android we can use setFlag at Field level or use Flatten at Page level to make the pdf read only. Even though PDFTron claims we can use setUserInteraction to false that did not work but other two are working.

That being said, is there a similar/equivalent way in iOS? Can you throw some ideas in there please?

- Vincent

The exact answer depends on exactly what you mean by “read only” and what actions are (not) allowed. For example changing view modes? changing pages? annotating? form field filling?

Most likely what you are looking for is to do either or both of the following.

  1. Set userInteractionEnabled to False.
  2. Do not call setToolManager in your code.

you’d think the set user interaction enabled would completely disable the user from reading the pdf?

If you want to prevent certain users from simply reading a PDF, then you would use encryption.