Hide Blazor PdfViewerToolbar

1 Answer 57 Views
PDFViewer
Mark
Top achievements
Rank 1
Iron
Mark asked on 06 Nov 2023, 09:12 PM
I can hide the toolbar buttons by defining a blank toolbar component.  But the toolbar, or the space that the toolbar occupies is still visible.

<TelerikPdfViewer Data="Document.Image">
    <PdfViewerToolBar>
    </PdfViewerToolBar>
</TelerikPdfViewer>

1 Answer, 1 is accepted

Sort by
1
Hristian Stefanov
Telerik team
answered on 07 Nov 2023, 11:49 AM

Hi Mark,

By defining a blank toolbar component, the container indeed remains visible. Therefore, to hide the entire toolbar easily, use the following CSS style:

<style>
    .k-pdf-viewer .k-toolbar {
        display: none;
    }
</style>

<TelerikPdfViewer Data="@PdfSource" />

@code {
    private byte[] PdfSource { get; set; }
}

Please run and test the above code snippet to see the result.

Regards,
Hristian Stefanov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Tags
PDFViewer
Asked by
Mark
Top achievements
Rank 1
Iron
Answers by
Hristian Stefanov
Telerik team
Share this question
or