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)
fmotsch Posted: Wednesday, February 7, 2018 1:01:00 AM(UTC)
 
Thank you, it works perfectly !!!!!
Paul Rayman Posted: Tuesday, February 6, 2018 5:24:58 PM(UTC)
 
If I understood you correctly, you should change pdfViewer1.Padding property
fmotsch Posted: Tuesday, February 6, 2018 7:02:54 AM(UTC)
 
Hello Paul,

I've tried that:

PageHAlign : Center
PageVAlign: Top
VerticalAlignement: Stretch
Vertical contentAlignement : Top

And then i tried with this code:

private void pdfViewerMouseWheel(object sender, MouseWheelEventArgs e)
{
if (e.Delta < 0 || e.Delta > 0)
{
// Get the x and y coordinates of the mouse pointer.
System.Windows.Point position = e.GetPosition(this);
double pY = position.Y;
double pX = position.X;


// Sets the Height/Width of the circle to the mouse coordinates.
pdfViewer.Height = pY;
pdfViewer.Width = pX;


}
}

The problem is that all the pdfViewer move and i would like that only the open PDF follows the mouse cursor...
Can you help me?

Thanks
Paul Rayman Posted: Thursday, November 16, 2017 1:09:55 AM(UTC)
 
The pages in the viewer are aligned according to the PageAlign property.
In your case, you have PageAlign = MiddleCenter.

There is only one way to influence to page position. If you know the displayed size of the page and the client size of the viewer, then you can calculate the page offset from its normal position. Accordingly, you can set the padding value of the viewer and thus move the page to the desired position vertically.
Summarizing:
1. set pdfViewer.PageAlign to ContentAlignment.TopCenter
2. Calculate page offset from the top border of the viewer
3. set pdfViewer.Padding.Top to calculated value.
Guest Posted: Wednesday, November 15, 2017 2:20:37 AM(UTC)
 
Hello everyone,

With your help, and more specifically, Paul Rayman's help (thanks again), I have been able to put a nice mouse wheel zoom on my application.
I'm now facing a new zoom problem.
When I zoom out on my PDF, there is no problem, but when i zoom in, the zoom isn't very precise at the beginning because the PDF page is vertically centered when the vertical scrollbar is visible.

I would like that the PDF stay focus on where the mouse cursor is (vertically). I would like to end up with a floating margin top and bottom.

Can someone tell me where (or how) the PDF position is managed.

Thank you very much !