Rank: Guest
Groups: Guests
Joined: 1/5/2016(UTC) Posts: 162
Was thanked: 5 time(s) in 5 post(s)
|
Hi, when i zoom on my pdf i have this screen not all the time... How can i solve this issue ? Thanks 
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
You must limit the maximum size of the page when zooming
|
|
|
|
|
|
Rank: Guest
Groups: Guests
Joined: 1/5/2016(UTC) Posts: 162
Was thanked: 5 time(s) in 5 post(s)
|
how i can do that please ?
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
somehow like this: Code:
protected override void OnMouseWheel(MouseEventArgs e)
{
if ((ModifierKeys & Keys.Control) == Keys.Control)
{
float newZoom = Zoom;
if (e.Delta < 0)
newZoom *= 0.9f;
else
newZoom /= 0.9f;
if (_maxPageSize * newZoom >100 &&_maxPageSize * newZoom < 5000)
Zoom = newZoom;
}
else
base.OnMouseWheel(e);
}
|
|
|
|
|
|
Rank: Guest
Groups: Guests
Joined: 1/5/2016(UTC) Posts: 162
Was thanked: 5 time(s) in 5 post(s)
|
it doesn't work and i need to be able to zoom on a element. but with your method i can zoom 150 % max. i catch pdfiumexception or outofmemory Code:Point p = e.GetPosition(null);
float newzoom = this.pdfViewer.Zoom;
if (e.Delta > 0)
{
newzoom /= 0.9f;
}
else
{
newzoom *= 0.9f;
}
if (700 * newzoom > 100 && 700 * newzoom < 5000)
{
this.pdfViewer.Zoom = newzoom;
this.pdfViewer.PageToClient(this.pdfViewer.CurrentIndex, p);
}
how can i know the _maxPageSize varible and i use wpf error : Patagames.Pdf.Net.Exceptions.PdfiumException: Unexpected error code. at Patagames.Pdf.Net.PdfBitmap..ctor(IntPtr handle) at Patagames.Pdf.Net.PdfBitmap.Clone(FX_RECT clip) at Patagames.Pdf.Net.Controls.Wpf.PdfViewer.DrawPage(DrawingContext drawingContext, PdfPage page, Rect actualRect) Edited by user Tuesday, April 26, 2016 1:21:30 AM(UTC)
| Reason: Not specified
|
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot 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