My question is related to Syncfusion PDFViewer Control.
I am trying to Navigate to a specific section in a pdf Document. I can go to a specific page, I can also scroll to a specific offset. But I can't do both. ie. I cant go to offset 641 of page 80 of a pdf file loaded.
What I've done:-
- Loaded the pdf file
pdfViewerControl1.Load(@"F:\sample.pdf");
- I get offset of a user's text selection after TextSelectionCompletion Event
Dictionary SelectedTexts = selectedTextInfo.Value; // [selected text from pdf , {X=323,Y=674,Width=121,Height=9}] - Now on a button click, I need pdfViwer to scroll to this selection at some point. ButtonClick()
ButtonClick()
{
pdfViewerControl1.GoToPageAtIndex(80); // Here I can go to page 80
pdfViewerControl1.ScrollTo(320, 674); // Here the page again resets to Page 1 but scrolling to bottom section
}
How can I go to offset 320,674 on page 80?