Completed
Last Updated: 05 Nov 2024 15:48 by ADMIN
Release 2024 Q4 (Nov)

Bug report

Reproduction of the problem

  1. Initialize a PDFViewer and add a button that calls a controller action on click.
<div id="pdfViewer">
</div>

<script type="text/javascript">
    $("#pdfViewer").kendoPDFViewer({
        pdfjsProcessing: {
            file: ""
        }
    });

    function loadFile() {
        $("#pdfViewer").data("kendoPDFViewer").fromFile("@Url.Action("GetPDF", "Home")");
    }
</script>
  1. Implement an action that returns a .pdf file or occasionally returns HttpNotFoundResult:
public ActionResult GetPDF()
{

    var name = "sample.pdf";
    string path = Server.MapPath("/Content/pdf/sample.pdf");

    //generate a random boolean:
    Random rng = new Random();
    bool randomBool = rng.Next(0, 2) > 0;
            
    if (randomBool)
    {
        byte[] fileBytes = System.IO.File.ReadAllBytes(path);
        return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, name);
    }
    else
    {
        return new HttpNotFoundResult("File not found.");
    }
}

Current behavior

In the case where the request returns HttpNotFoundResult, a number of js errors are thrown:

util.js:417 Uncaught (in promise)

The user loses the ability to load a file, because subsequent attempts to load a file by clicking the button result in another js exception:

api.js:1114 Uncaught TypeError: Cannot read properties of null (reading 'sendWithStream')

Expected/desired behavior

The component should show a message that a file is not found, without throwing js exceptions and should not become unusable after a failed attempt to load a file.

Environment

  • Kendo UI version: 2024.1.319
  • jQuery version: x.y
  • Browser: [all]
Completed
Last Updated: 31 Oct 2024 08:35 by ADMIN
Release 2024 Q4 (Nov)

Bug report

Using the PDFViewer with the latest version of PDF.js (3.9.179) throws js exceptions. Version 3.4.120 is the last one, with which no js exception is thrown.

Reproduction of the problem

Dojo example: https://dojo.telerik.com/IHedIhur/3

  1. Open the devtools consolve and run the example.

Current behavior

The file is loaded, however, js exceptions are thrown:

The --scale-factor CSS-variable must be set, to the same value as viewport.scale, either on the container-element itself or higher up in the DOM. text_layer.js:480:14

Expected/desired behavior

No js exceptions when using PDF.js versions newer than v3.4.120.

Environment

  • Kendo UI version: 2023.2.718
  • jQuery version: x.y
  • Browser: [all]
Need More Info
Last Updated: 08 Aug 2024 14:53 by ADMIN
Created by: Sujeet
Comments: 1
Category: PDFViewer
Type: Bug Report
0

We are using Kendo MVC version: 2021.3.1109.545

When we tried to open the PDF file from the application using PDF viewer, we can see the fonts getting blurred and fuzzy as shown below.

 

Unplanned
Last Updated: 09 Nov 2023 13:03 by Eric Mooiweer
Created by: Eric Mooiweer
Comments: 0
Category: PDFViewer
Type: Feature Request
1
Currently, the Print functionality works only with PDF.js. Provide a Print option when the PDFViewer is configured to use DPLProcessing.
Completed
Last Updated: 12 Oct 2023 10:22 by ADMIN
Created by: Narendra
Comments: 7
Category: PDFViewer
Type: Feature Request
15
Can you implement a scrollbar for the PDF viewer control? The current scrolling doesn't allow the user to grab the scrollbar and do the scrolling.
Unplanned
Last Updated: 28 Jun 2023 10:12 by ADMIN
Created by: Mugurel
Comments: 1
Category: PDFViewer
Type: Feature Request
1

Currently, default zoom can be set through JavaScript in the Render event handler of the PDFViewer:

Attach the handler:

.Events(e => e.Render("onRender"))

The event handler:

<script>
    var firstRender = true;

    function onRender(e) {
        if (firstRender) {
            var combobox = e.sender.toolbar.element.find("[data-command=ZoomCommand][data-role=combobox]").data("kendoComboBox");
            combobox.value("fitToWidth");
            combobox.trigger("change");
            firstRender = false;
        }
    }
</script>

A better solution would be a dedicated configuration option that allows setting the default zoom when declaring the PDFViewer.

Completed
Last Updated: 07 Sep 2022 15:21 by ADMIN
Release 2022.R3

Bug report

Reproduction of the problem

Reproducible in the demos: https://demos.telerik.com/kendo-ui/pdfviewer/index

  1. Shrink the browser window so that the zoom tool goes into the overflow menu.
  2. Click on the overflow button to open the menu.

Current behavior

The zoom tool is disabled.

Expected/desired behavior

The zoom tool is enabled.

Environment

  • Kendo UI version: 2021.1.330
  • jQuery version: x.y
  • Browser: [all]
Declined
Last Updated: 03 Sep 2021 13:29 by ADMIN
Created by: Mugurel
Comments: 1
Category: PDFViewer
Type: Bug Report
0

I load a pdf on a PDFViewer component using loadDefault function, but Open event is not fired.

Also, I want to scroll to the end of the document and for that, I need to retrieve the count of the pages and activate the last page in the render event, even it's called multiple times.

How can I get the count of the pages and scroll to the end of the .pdf document after it is loaded?

    @(Html.Kendo().PDFViewer().Name("documentViewer")
        .PdfjsProcessing(pdf => pdf.File(Url.Content("~/Content/data/default.pdf")))
        .Events(e => e
            .Error("(function(e) { onDocumentViewerError(e); })")
            .Render("(function(e) { onDocumentViewerRender(e); })")
            .Open("(function(e) { onDocumentViewerOpen(e); })")
        )
    )
...
<script type="text/javascript">
...

function loadDefault() {
    var docUrl = window.location.origin + window.location.pathname + "Content/data/default.pdf";

    var pdfViewer = $("#documentViewer").data("kendoPDFViewer");
    pdfViewer.fromFile(docUrl);
 }

onDocumentViewerRender = function(e) {
    console.log("render");

    if (goToEnd) {
         goToEnd = false;

         setTimeout(function () {
              var pdfViewer = $("#documentViewer").data("kendoPDFViewer");
              pdfViewer.activatePage(pagesCount); // how to get pagesCount
         }, 2000);
    }
}

onDocumentViewerOpen = function(e) {
    console.log("open"); // not shown in Console
}
...
</script>
Completed
Last Updated: 18 Jan 2021 09:09 by ADMIN
Release 2021.R1
Created by: Ken
Comments: 0
Category: PDFViewer
Type: Bug Report
5

Bug report

A server side exception:
System.OverflowException: 'Value was either too large or too small for a Double.'
is thrown on attempting to serialize an existing .pdf file converted to FixedDocument.

Reproduction of the problem

  1. Use the DPL Processing demo of the PDFViewer in the MVC demos project.
  2. Instead of the default sample.pdf load the Development Plan.pdf file provided in Ticket ID: 1467984
public ActionResult GetInitialPdf(int? pageNumber)
{
    //exception with Development plan.pdf file:
    string filePath = Path.Combine(Server.MapPath("~/Content/web/pdfViewer"), "Development Plan.pdf");
    //it works with the sample.pdf file:
    //string filePath = Path.Combine(Server.MapPath("~/App_Data"), "sample.pdf");
    FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read);
    JsonResult jsonResult;
    FixedDocument doc = FixedDocument.Load(stream);

    if (pageNumber == null)
    {
        jsonResult = Json(doc.ToJson(), JsonRequestBehavior.AllowGet);
    }
    else
    {
        jsonResult = Json(doc.GetPage((int)pageNumber), JsonRequestBehavior.AllowGet);
    }

    jsonResult.MaxJsonLength = int.MaxValue;
    return jsonResult;
}

Current behavior

The exception is thrown during the FixedDocument JSON serialization:

doc.ToJson()

at the following place: ConvertToList method in ArrayExtension class (Telerik.Web.PDF namespace)

Expected/desired behavior

No exceptions are thrown during serialization.

Environment

  • Kendo UI version: 2020.2.513
  • jQuery version: x.y
  • Browser: [all]
Completed
Last Updated: 14 Oct 2020 08:36 by ADMIN
Release 2020.R3.SP.next
Created by: Margarita
Comments: 0
Category: PDFViewer
Type: Bug Report
0

Bug report

There is empty title attribute of PDFViewer zoom level combobox

Reproduction of the problem

  1. Go to https://demos.telerik.com/kendo-ui/pdfviewer/index
  2. Inspect the zoom level combobox

Current behavior

Empty "title" attribute

Expected/desired behavior

The "title" attribute of the combobox explains the purpose of the combobox, e. g. Zoom level combobox

Environment

  • Kendo UI version: 2020.2.617
  • Browser: all
Unplanned
Last Updated: 21 Jul 2020 11:40 by ADMIN
Created by: Margarita
Comments: 0
Category: PDFViewer
Type: Feature Request
0

Currently, the search in PDF Viewer is performed on every keypress in the search input field. 

The search performance of the widget could be improved if there is a possibility to perform a search on pressing "Enter". Another valuable enhancement could be a configuration that allows the search to be performed after entering a certain number of symbols. 

Unplanned
Last Updated: 09 Dec 2019 13:32 by ADMIN
Created by: Albert
Comments: 1
Category: PDFViewer
Type: Feature Request
0
Please add keyboard scrolling support for the PDFViewer control. Scrolling through files with a lot of pages is very difficult.
Unplanned
Last Updated: 21 Nov 2019 08:49 by ADMIN

Hi,

 

i tested the updated pdfviewer of version 2019.3.1023, but it did not work as expected.

I have some questions about usage und customizing

  1. How can i customize the toolbar actions, primary the print action/command? See the dojo link
  2. Is it possible to get the print window result of the pdf viewer?
  3. Is it possoble to call the print command? I tested the execute function, but it doesn't work. I get only an error (this is not an constructor...)
  4. the download function download every time a document.pdf, the assigned name is ignored

https://dojo.telerik.com/EmErekOB

 

Regards

Christian

Unplanned
Last Updated: 04 Nov 2019 15:06 by ADMIN

Bug report
Open a pdf file with links in PDF Viewer. Links are not clickable.

Reproduction of the problem
Open the demo for the PDF Viewer
Open a file, containing links
Click on a link

Current behavior
Clicking on a link does not redirect to the page

Expected/desired behavior
Clicking on a link should redirect to the link.

Environment
Kendo UI version: 2019.3.1023

Browser: [all]

Completed
Last Updated: 16 Sep 2019 14:23 by ADMIN
Release 2019.R3

Bug report

The toolbar.click is not serialized correctly when a custom button is added to the ToolBar of the widget. Thus, the click event is not being executed.

Reproduction of the problem

@(Html.Kendo().PDFViewer()
    .Name("test")
    .PdfjsProcessing(pdf => pdf.File(""))
        .Toolbar(t => t.Items(i =>
            {
            i.Add().Name("Open").Id("Open").Command("OpenCommand").Type("button").Icon("folder-open");
            i.Add().Name("Print").Id("Print").Type("button").Icon("print").Click("onPrintClick");
        }))
        .Height(500)
)

<script>
   function onPrintClick(e) {
        alert(e);
    }
</script>

Current behavior

toolbar is not serialized correctly.

Expected/desired behavior

toolbar.click should be serialized correctly.

Environment

  • Kendo UI version: 2019.2.516
  • Browser: [all]