Hi Jeosebastian
Greetings from Syncfusion,
In our EJ2 PDF Viewer right click will be enabled only the text content in the PDF document is selected. We can disable the text selection by setting false to
enableTextSelection.
The toolbar settings of the PDF Viewer can be set using the
toolbarSettings API during control initialization and it contains the following properties:
ShowTooltip: Shows or hides the tooltip of the toolbar items.
ToolbarItem: Shows or hides the toolbar items in the PDF Viewer toolbar.
Refer to the following to remove print and download icons in toolbar
HTML:
<div class="content-wrapper">
<ejs-pdfviewer id="pdfViewer" [serviceUrl]='service' [documentPath]='document' [toolbarSettings]= 'toolbarSettings' style="height:850px;display:block"></ejs-pdfviewer>
</div>
TS
export class AppComponent implements OnInit {
public service = 'https://ej2services.syncfusion.com/production/web-services/api/pdfviewer';
public document = 'PDF_Succinctly.pdf';
public toolbarSettings = { toolbarItem: 'OpenOption,PageNavigationTool, MagnificationTool, PanTool, SelectionTool, SearchOption'};
ngOnInit(): void {
}
} |
We have created the sample for the same and shared in the following location,
You can hide the toolbar items form the PDF Viewer toolbar dynamically using the
showToolbarItem method. The list of available toolbar items is identified using the
ToolbarItem property. Refer to the following code to hide the Open icon from the PDF Viewer toolbar.
window.onload = function () {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.toolbar.showToolbarItem(new Array("OpenOption"), false);
} |
Please try this and revert us with more details about your requirement if you have any concerns on this.
Regards,
Akshaya