Patagames Software Support Forum
»
Pdfium.Net SDK
»
Common Questions
»
WPF: Remember last position in PDF page before tab change
Rank: Newbie
Groups: Registered
Joined: 8/29/2023(UTC) Posts: 2 
|
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
|
|
|
|
Patagames Software Support Forum
»
Pdfium.Net SDK
»
Common Questions
»
WPF: Remember last position in PDF page before tab change
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.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close