New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Localization

RadPdfViewer provides a built-in mechanism for easy localization of the all of its tools and messages. Below you will find a table with all messages that can be localized through the control:

Localization Messages

RadPdfViewer > MessagesSettings

Property NameDescription
DefaultFileNameSpecifies the default file name used for Download.

Toolbar Messages

RadPdfViewer > MessagesSettings > ToolBarMessages

Property NameDefault Value
DownloadDownload
ExportAsExport
OpenOpen
PagerMessages.FirstGo to the first page
PagerMessages.LastGo to the last page
PagerMessages.NextGo to the next page
PagerMessages.Ofof {0}
PagerMessages.Pagepage
PagerMessages.Pagespages
PagerMessages.PreviousGo to the previous page

Dialog Messages

RadPdfViewer > MessagesSettings > DialogsMessages

Property NameDefault Value
CancelCancel
OkTextOK
SaveSave
ExportAsDialogMessages.DefaultFileNameDocument
ExportAsDialogMessages.PdfPortable Document Format (.pdf)
ExportAsDialogMessages.PngPortable Network Graphics (.png)
ExportAsDialogMessages.SvgScalable Vector Graphics (.svg)
ExportAsDialogMessages.TitleExport...
ExportAsDialogMessages.LabelsMessages.FileNameFile name
ExportAsDialogMessages.LabelsMessages.PagePage
ExportAsDialogMessages.LabelsMessages.SaveAsTypeSave as

Error Messages

RadPdfViewer > MessagesSettings > ErrorMessages

Property NameDefault Value
NotFoundFile is not found.
NotSupportedOnly pdf files allowed.
ParseErrorPDF file fails to process.

Example 1: Localized RadPdfViewer

ASP.NET
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js"></script>

<script type="text/javascript">
    window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js';
</script>

<telerik:RadPdfViewer runat="server" ID="RadPdfViewer1" Height="400px" Width="800px">
    <PdfjsProcessingSettings File="Document.pdf"></PdfjsProcessingSettings>
    <MessagesSettings DefaultFileName="Document">
        <ToolBarMessages Download="Download" ExportAs="Export" Open="Open">
            <PagerMessages First="Go to the first page" Last="Go to the last page" Next="Go to the next page" Of="of {0} " Page="page" Pages="pages" Previous="Go to the previous page" />
        </ToolBarMessages>
        <DialogsMessages Cancel="Cancel" OkText="OK" Save="Save">
            <ExportAsDialogMessages DefaultFileName="Document" Pdf="Portable Document Format (.pdf)" Png="Portable Network Graphics (.png)" Svg="Scalable Vector Graphics (.svg)" Title="Export...">
                <LabelsMessages FileName="File name" Page="Page" SaveAsType="Save as" />
            </ExportAsDialogMessages>
        </DialogsMessages>
        <ErrorMessages NotFound="File is not found." NotSupported="Only pdf files allowed." ParseError="PDF file fails to process." />
    </MessagesSettings>
</telerik:RadPdfViewer>