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)
Guest Posted: Wednesday, June 20, 2018 5:58:24 AM(UTC)
 
Message was deleted by a User. | Reason: Not specified
Paul Rayman Posted: Tuesday, March 27, 2018 6:23:43 AM(UTC)
 
Code:

float width_in_inches = page.Width/72;
float height_in_inches = page.Height/72;
fmotsch Posted: Tuesday, March 27, 2018 6:06:57 AM(UTC)
 
That works great, thanks.

But now i have a new problem that I didn't see coming.
Some of my PDF are at the A4 format and other are way longer.
I don't need for my A4 PDF to be on the left top corner of the pdfViewer. (It's ugly)
Is there a function to get the size of my page?)

My code would look a bit like that fake code. I'm gonna check if it works...

Code:
if(pdfViewer.CurrentPage.Width() > A4.format)
{
    this.pdfViewer.PageHAlign = 0;
    this.pdfViewer.PageVAlign = 0;
    pdfViewer.Padding = new Thickness(0, 0, 0, 0);
}



IT WORKS !!!!!
THANKS...
Paul Rayman Posted: Tuesday, March 27, 2018 5:19:56 AM(UTC)
 
Try to set Padding and PageMargin to zero
and PageAlignment to Left and Top
fmotsch Posted: Tuesday, March 27, 2018 3:32:15 AM(UTC)
 
Hello,

I'm trying to make sure that my PDFs are open at the position 0,0 of the pdfViewer.
I'm using these lines but it doesn't works:

Code:

this.pdfViewer.LoadDocument(filePath, this.done);
this.pdfViewer.Zoom = 0.75F;
this.pdfViewer.ScrollToPoint(this.pdfViewer.CurrentIndex, new Point(0, 0));


Do you have a solution ?