PdfiumViewer icon indicating copy to clipboard operation
PdfiumViewer copied to clipboard

current page display while scrolling pdf document in vb.net

Open singingsang opened this issue 9 years ago • 2 comments

basically I want to display current page number after when user scrolls pdf using scrollbar. I tried to use custom event as in example demo - pdfViewer1.Renderer.DisplayRectangleChanged but this event is no more available to vb.net project , but same is available if I try in C# project, unfortunately my project is in vb.net so need someway how I can call this event or get page number when scrolling happens with any other event.

Thank you.

singingsang avatar Jun 02 '16 10:06 singingsang

Still stuck up with getting simple page number while scrolling happens. this may sound very basic but can anyone help how to relate PDFViewer with CustomScrollcontrol to get current page when scrolling occurs? I am not able to find how CustomScrollControll can be used when scrolling occurs for PDFViewer. any help on this is appreciated.

singingsang avatar Jun 08 '16 11:06 singingsang

I've had a look at this and I'm not sure what's wrong. To be honest, I'm not very string at VB.NET, but I got the following working:

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        AddHandler PdfViewer1.Renderer.DisplayRectangleChanged, AddressOf DisplayRectangleChanged
    End Sub

    Private Sub DisplayRectangleChanged()
        Throw New NotImplementedException
    End Sub
End Class

This is with a new project, dropping a PdfViewer instance on the form. This does correctly go into the event handler.

pvginkel avatar Jun 17 '16 08:06 pvginkel