Skip to content

How to access the PDFViewerApplication inside the WiseJ.PdfViewer? #1515

Description

@itg-assistant

Nic Adams asked 2018-04-27 11:11:46 UTC

I'm still trying to set the download filename on the PdfViewer control when using pdf.js as the viewer. I've discovered that the underlying javascript object PDFViewerApplication, has a method setTitleUsingUrl() which takes a URL and then figures out the filename from it.

My problem now is that I cannot figure out how to access the PDFViewerApplication object. I’ve tried to do this from OnWebRender and from other objects and using Eval(string.Format(“PDFViewerApplication.setTitleUsingUrl(‘{0}’);”, Application.Url + fileName)); but I always get “PDFViewerApplication is undefined”

I've tried to debug the js but I just cannot find this object anywhere and as I'm a c# developer I don't understand the js model or the development tools enough to find this object. I've spend a couple of days trying to work it out but am getting nowhere.

Can anyone point me in the right direction?

TIA

Nic

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions