Rank: Member
Groups: Registered
Joined: 2/6/2018(UTC) Posts: 11  Location: Paris Thanks: 6 times
|
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 ?
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
Try to set Padding and PageMargin to zero and PageAlignment to Left and Top Edited by user Tuesday, March 27, 2018 5:20:27 AM(UTC)
| Reason: Not specified
|
 1 user thanked Paul Rayman for this useful post.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 2/6/2018(UTC) Posts: 11  Location: Paris Thanks: 6 times
|
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... Edited by user Tuesday, March 27, 2018 6:19:35 AM(UTC)
| Reason: Not specified
|
|
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,138
Thanks: 10 times Was thanked: 133 time(s) in 130 post(s)
|
Code:
float width_in_inches = page.Width/72;
float height_in_inches = page.Height/72;
|
|
|
|
|
|
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