Please expose a parameter to show or hide the "Select files..." button inside the empty PDF Viewer.
Currently, a possible workaround is to use CSS. Additionally, you may configure the Toolbar to not include the "Open" tool.
<style>
.no-open .k-blank-page {
display: none;
}
/* Use these selectors if you want to separately target the upload or the dropzone */
/* .no-open .k-external-dropzone,
.no-open .k-upload{
display: none;
} */
</style>
<TelerikPdfViewer Data="@PdfSource"
OnOpen="@OnPdfOpen"
Height="600px"
Class="no-open">
<PdfViewerToolBar>
<PdfViewerToolBarDownloadTool />
<PdfViewerToolBarPrintTool />
<PdfViewerToolBarSpacer />
<PdfViewerToolBarPagerTool />
<PdfViewerToolBarSpacer />
<PdfViewerToolBarZoomTool />
<PdfViewerToolBarSelectionTool />
<PdfViewerToolBarSearchTool />
<PdfViewerToolBarAnnotationsTool />
</PdfViewerToolBar>
</TelerikPdfViewer>
@code {
private byte[] PdfSource { get; set; }
private bool LoaderVisible { get; set; }
private async Task OnPdfOpen(PdfViewerOpenEventArgs args)
{
// Cancel the event for additional precaution in case someone bypasses the CSS and forces the page to show the button and the dropzone.
args.IsCancelled = true;
}
}