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)
bosslaw Posted: Wednesday, April 22, 2020 9:00:53 AM(UTC)
 
thank you very much for the code Paul. It helped a lot.
Paul Rayman Posted: Wednesday, April 22, 2020 5:58:23 AM(UTC)
 
Hi.

Well... you can try such a trick.

Code:

var page = pdfViewer1.CurrentPage;
var ptLeftBottom = pdfViewer1.PageToClient(page.PageIndex, new Point(0, 0));
var ptRightUp = pdfViewer1.PageToClient(page.PageIndex, new PointF(page.Width, page.Height));
int width = Math.Abs(ptRightUp.X - ptLeftBottom.X);
int height = Math.Abs(ptRightUp.Y - ptLeftBottom.Y);
bosslaw Posted: Wednesday, April 22, 2020 2:00:56 AM(UTC)
 
Hi,

I have loaded the document in the pdfviewer.

Now, I need to get the size of the current page when I zoom in and zoom out. Is there a way to access the width and height properties?

I have tried this.pdfViewer1.CurrentPage.Document.Pages[0].Height and Width but these properties are not changing when I zoom in and zoom out.

Thanks in advance for help.