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.
Document View - How do you add documents?
- Quincunxian
- Posts: 112
- Joined: Sunday 25th June 2017 12:14am
- Location: Western Australia
Document View - How do you add documents?
Cheers - Quin.
I code therefore I am
I code therefore I am
Re: Document View - How do you add documents?
...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