Problem with pdf file view

Post your Gambas programming questions here.
Post Reply
bill-lancaster
Posts: 195
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Problem with pdf file view

Post by bill-lancaster »

The following code:-

Code: Select all

Public Sub Form_Open()
  hPDF = New PdfDocument(User.Home &/ "Downloads/LancasterLmarriage.pdf")
  hImage = hPDF[0].Render(Desktop.Resolution)
  PictureBox1.W = hImage.W
  PictureBox1.Image = hImage
End
Displays the image OK but part of the left hand side of the image is cut off.
Any help would be welcome
vuott
Posts: 263
Joined: Wednesday 5th April 2017 6:07pm
Location: European Union

Re: Problem with pdf file view

Post by vuott »

Try:
hImage = hPDF[0].Render(0, 0, hPDF[0].Render().W, hPDF[0].Render().H, 0, hPDF.Resolution
Europaeus sum !

Amare memorentes atque deflentes ad mortem silenter labimur.
bill-lancaster
Posts: 195
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Re: Problem with pdf file view

Post by bill-lancaster »

That works very well vuott,
Thank you, don't know why I didn't think of it!
Post Reply