logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
nghyemi  
#1 Posted : Friday, June 20, 2025 4:06:22 AM(UTC)
Quote
nghyemi

Rank: Newbie

Groups: Registered
Joined: 8/29/2023(UTC)
Posts: 2
Germany

How can I remember the actual viewpoint of the user? And how can I set it later when the user open same tab again?

I use following code. But the position is wrong:


Code:


            int pageIndex = viewer.CurrentIndex;
            Rect rect = viewer.CalcActualRect(pageIndex);
            map[id].rect = rect;




Here is my code to get the position:

Code:


        public void RestoreRectVisibility(int pageIndex, Rect rect)
        {
            
            Point viewerPoint = new Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);
            pdfViewer.ScrollToPoint(pageIndex-1, viewerPoint);
            
         }




Do you have any idea why the code isn't working?

Edited by user Friday, June 20, 2025 5:33:53 AM(UTC)  | Reason: Not specified

Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.