How to rotate pdf inside Pdf Viewer?

The PDF Viewer module on the module marketplace supports rotation.

Try code like:

pdfViewer.controller.documentViewController.setRotateRight()