PDF Viewer Tag Helper Toolbar Items

1 Answer 236 Views
PDFViewer
John
Top achievements
Rank 2
Iron
Iron
Iron
John asked on 13 May 2021, 12:41 PM

What is the correct Tag Helper syntax for the toolbar items Toogle Selection and Zoom?  I'm guessing below because I can't find these two documented anywhere.  The link below gives you some of them but not all.  What I'm trying to do is have the toolbar show all the default items except the open command which requires me to specify all toolbar items except open.

https://demos.telerik.com/aspnet-core/pdfviewer/tag-helper


    <kendo-pdfviewer name="pdfviewer">
        <pdfjs-processing file="@(Url.Action("GetReportDownload", "Downloader"))"/>
        <toolbar enabled="true">
            <pdfviewer-toolbar-items>
                <pdfviewer-toolbar-item command="PageChangeCommand" type="pager" name="pager"></pdfviewer-toolbar-item>
                <pdfviewer-toolbar-item type="spacer" name="spacer"></pdfviewer-toolbar-item>
                <pdfviewer-toolbar-item command="ZoomCommand" type="zoom" name="zoom"></pdfviewer-toolbar-item>
                <pdfviewer-toolbar-item command="ToggleSelectionCommand" type="toggleSelection" name="toggleSelection"></pdfviewer-toolbar-item>
                <pdfviewer-toolbar-item type="spacer" name="spacer"></pdfviewer-toolbar-item>
                <pdfviewer-toolbar-item command="OpenSearchCommand" type="button" name="search" icon="search"></pdfviewer-toolbar-item>
                <pdfviewer-toolbar-item command="DownloadCommand" type="button" name="download" icon="download"></pdfviewer-toolbar-item>
                <pdfviewer-toolbar-item command="PrintCommand" type="button" name="print" icon="print"></pdfviewer-toolbar-item>
            </pdfviewer-toolbar-items>
        </toolbar>
    </kendo-pdfviewer>

 

 


1 Answer, 1 is accepted

Sort by
1
Accepted
Aleksandar
Telerik team
answered on 18 May 2021, 08:17 AM

Hi John,

You can render the default tools for Toggle Selection and Zoom the following way:

<kendo-pdfviewer name="pdfviewer">
    <pdfjs-processing file="@(Url.Action("GetReportDownload", "Downloader"))" />
    <toolbar enabled="true">
        <pdfviewer-toolbar-items>
            <pdfviewer-toolbar-item command="PageChangeCommand" type="pager" name="pager"></pdfviewer-toolbar-item>
            <pdfviewer-toolbar-item type="spacer" name="spacer"></pdfviewer-toolbar-item>
            <pdfviewer-toolbar-item name="zoom"></pdfviewer-toolbar-item>
            <pdfviewer-toolbar-item name="toggleSelection"></pdfviewer-toolbar-item>
            <pdfviewer-toolbar-item type="spacer" name="spacer"></pdfviewer-toolbar-item>
            <pdfviewer-toolbar-item command="OpenSearchCommand" type="button" name="search" icon="search"></pdfviewer-toolbar-item>
            <pdfviewer-toolbar-item command="DownloadCommand" type="button" name="download" icon="download"></pdfviewer-toolbar-item>
            <pdfviewer-toolbar-item command="PrintCommand" type="button" name="print" icon="print"></pdfviewer-toolbar-item>
        </pdfviewer-toolbar-items>
    </toolbar>
</kendo-pdfviewer>

Regards,
Aleksandar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
PDFViewer
Asked by
John
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Aleksandar
Telerik team
Share this question
or