[Gambas-user] DocumentView

Fabien Bodard gambas.fr at ...626...
Fri Nov 14 19:25:24 CET 2014


Hi all

I've done a new widget for may how needs and push it in gb.form.

DocumentView is done to make easy to create viewer for different kind
of documents.


This is an example for a pdf.



' Gambas class file

Private hpdf As New PdfDocument

Public Sub Form_Open()

  hpdf.Open("/home/fabien/Downloads/IntroProgBash.pdf")
  DocumentView31.Count = hpdf.Count

End

Public Sub DocumentView31_Layout(Page As Integer)

  Last.Layout.Height = hpdf[Page + 1].Height / 0.72
  Last.Layout.Width = hpdf[Page + 1].Width / 0.72

End

Public Sub DocumentView31_Draw(Page As Integer, Width As Integer,
Height As Integer)

  Draw.Image(hpdf[Page + 1].Image, 0, 0)

End

Public Sub DocumentView31_Zoom()

  hpdf.Zoom = Last.Zoom / 0.72

End




As always ... there is bugs... and i want this simple widget to be
usefull for many. So tell me if you see bugs or for ask for some
features. Remember that this component must be as simple as possible.


As alway... forgive me for my bad english and for my spelling faults


Best regards,


-- 
Fabien Bodard




More information about the User mailing list