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

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
nghyemi Posted: Friday, June 20, 2025 1:06:22 AM(UTC)
 
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?