How to set read only for pdf viewer

Dear supporter
Is there any option to set read only to pdf viewer / disable toolbar, I have tried some properties but none of them help. User still can use function

<PdfViewerComponent
id="container"
documentPath={pdfBlobData}
serviceUrl="https://ej2services.syncfusion.com/production/web-services/api/pdfviewer"
style={{ height: '100%' }}
isDocumentEdited={false}
>
<Inject
services={[
Toolbar,
Magnification,
Navigation,
Annotation,
LinkAnnotation,
BookmarkView,
ThumbnailView,
Print,
TextSelection,
TextSearch,
FormFields,
FormDesigner,
]}
/>
</PdfViewerComponent>

1 Reply

AC ArunKumar Chandrakesan Syncfusion Team August 29, 2022 03:52 PM UTC

Hi Jay,


Query: Any option to read-only to pdf viewer / disable toolbar?


Yes, you can disable the toolbars by using the enable toolbar API.  For your reference, we have attached the documentation link and a sample below. Kindly refer to it and let us know if the solution provided is helpful.


Documentation link: https://ej2.syncfusion.com/documentation/api/pdfviewer/toolbar/


Sample link: https://stackblitz.com/edit/react-hqtmm9-whbl8c?file=index.js,index.html



Regard,

Arun kumar


Loader.
Up arrow icon