BigBlueButton PDF Annotations Server
Development environment
If you want to use virtualisation to run the project, you need to have vagrant
installed.
Env vars
Add the following lines to your .profile
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
source .profile
How to run?
cd /app
or app
alias if you are under vagrant
go get github.com/gorilla/mux
go get github.com/jung-kurt/gofpdf
go get github.com/llgcode/draw2d
go get github.com/spf13/viper
go get github.com/sirupsen/logrus
go get github.com/01walid/goarabic
go get github.com/pdfcpu/pdfcpu
Required packages for Python scripts:
pip install PyPDF2
librsvg2-bin required for svg to pdf conversion (rsvg-convert
)
sudo apt-get install librsvg2-bin
Run with go run main.go
PDF export API
Run API with go run main.go
Main options
- Download Presentation PDF
- [From events.xml] :
GET /MeetingID/PresentationID
- [From JSON body] :
GET /MeetingID/PresentationID
- Download one page from Presentation PDF
Configuration variables
- port (listening port for api ,
8100
) - OutputPath: (temp path ,
/tmp/
) - BBBPresPath: (presentation location ,
/var/bigbluebutton/
) - ScriptDir: (python scripts location ,
/usr/share/bbb-api-pyscript/
) - EventsPath: (events.xml file location ,
/var/bigbluebutton/
) - FontPath: ( Arial.ttf font location ,
/usr/share/fonts/
)
Example Requests:
{
"_eventname": "AddShapeEvent",
"presentation": "07bfb86c086066090f39d810096a329151261aec-1634463976664",
"whiteboardId": "07bfb86c086066090f39d810096a329151261aec-1634463976664/1",
"pageNumber": 0,
"type": "pencil",
"position": 0,
"dataPoints": "20.768291,44.483734,28.794786,43.68109,36.86562,44.239834,44.91463,44.239834",
"color": 16711680,
"thickness": 0.3658536585365854,
"dimensions": "List(547, 410)",
"commands": "1,4"
},
{
"_eventname": "AddShapeEvent",
"presentation": "07bfb86c086066090f39d810096a329151261aec-1634463976664",
"whiteboardId": "07bfb86c086066090f39d810096a329151261aec-1634463976664/2",
"pageNumber": 1,
"type": "text",
"x": 52.42053561740452,
"y": 52.905454282407405,
"fontColor": 255,
"textBoxWidth": 31.723717583550346,
"textBoxHeight": 8.80195900245949,
"text": "Test text",
"fontSize": 20,
"calcedFontSize": 4.88997555012225,
"position": 0,
"dataPoints": "52.42053561740452,52.905454282407405"
}
]'
Convert XML to json annotations
Just use test.go
application