It will be simple and obvious but for the moment it's eluding me !
How do you add a document to the view?
I can set 'blank' documents or placeholders for them by setting the count parameter,
but can't find a process to load or add a document.
Ask about the individual Gambas components here.
2 posts • Page 1 of 1
...beginning with this simple code (you have to activate gb.poppler Component):
Private DocumentView1 As DocumentView Private doc As PdfDocument Public Sub Form_Open() With Me .Height = Desktop.H .Width = Desktop.W .Arrangement = Arrange.Vertical End With doc = New PdfDocument("/path/of/document.pdf") With DocumentView1 = New DocumentView(Me) As "DocumentView1" .Column = 1 .Count = doc.Count .Expand = True End With End Public Sub DocumentView1_Draw(Page As Integer, Width As Integer, Height As Integer) Paint.DrawImage(doc[Page].Render(0, 0, Width, Height, 0, doc.Resolution * 2), 0, 0, Paint.Width, Paint.Height) End