If the PdfViewer is initialized with a default document, the display performance of this document will be a lot worse, compared to PDF documents that are loaded programmatically after the component is already on the web page.
I would like to have access to the search option of the pdf viewer.
I have an old Asp.net framework site hosting the scanned pages (57.000) of the local newspaper from its start in May 1945 and want to rewrite it in Blazor.
One of the features is that you can search for words on all pages (using SQL Full-text indexing search on a table with all the plain texts to quickly locate the pages containing these words) and when a found page is clicked show the pdf of that page and prefill the searchbox of the pdf viewer to automatic highlight the found words).
This article gives a solution to achieve that in JS, but it would be nice if this could be done from de C# code https://www.telerik.com/forums/open-pdfviewer-with-highlighted-text
Kind regards,
Kees Alderliesten
Hallo,
i want to Render PDF Files with the PDF Viewer Component.
The Data of the PDF is already fetched from the API when the PDF-Viewer starts Rendering the Loading animation appears and freezes.
After a few Seconds the PDF will be Rendered.
The size of the PDF File is about 5MB.
Pdf viewer should display form fields like Text fields, check boxes, etc and allow users to type in fields. Also support form field calculations.
Once populated, allow client side save to a file blob so that the data could be posted to a server or really whatever the dev wanted to do with it.
Adding the ability to fill in a PDF online in the PDF Viewer would open a lot of opportunity to the library.
The ability to fill-out, sign, and date would be great with a save callback, so it can be pushed to an API.
This request is for allowing to open other document types in PDF Viewer - for example, Word, Excel. The functionality will target viewing only and not editing.
The steps to handle the scenario will be the following:Note: We've registered a bug with this solution. The PDF Viewer does not open other types of documents from the FileSelect in the Toolbar, they can be opened only on initialization of the component. Currently, the bug is in our backlog. Once fixed, the above-listed solution can be used to configure the PDF Viewer for viewing other document types. A knowledge base resource will be published on the matter.
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:
<TelerikButton OnClick="@OnOpenToggle">Toggle Open Buttons</TelerikButton>
<TelerikPdfViewer Data="@PdfSource"
Class="@HideOpenClass"
Height="400px" />
<style>
.hide-open .k-blank-page,
.hide-open .k-button:has(.k-i-folder-open) {
display: none;
}
</style>
@code {
private byte[] PdfSource { get; set; }
private string HideOpenClass { get; set; } = string.Empty;
private async Task OnOpenToggle()
{
string _hideOpenClass = "hide-open";
HideOpenClass = HideOpenClass == _hideOpenClass ? string.Empty : _hideOpenClass;
}
}
When you search for a term, the document is not scrolled. Also when the user inserts a search term and clicks Enter the document is scrolled to the second match instead of the first one.