ngrebenshikov / openfl-alivepdf

The PDF generation library ported from AlivePDF AS3 projects (ported the FPDF PHP project)
MIT License
9 stars 2 forks source link

Port to kha? #4

Open Sondro opened 6 years ago

Sondro commented 6 years ago

How hard would this be to port to kha?

It looks like it's just using OpenFL for blobs and bitmap data which kha has.

ngrebenshikov commented 6 years ago

I don't think that it's too hard to port it to Kha.

I'll add that it also uses Flash drawing API. It's in pdf.PDF.hx

/*
    * AlivePDF Drawing API
    *
    * moveTo()
    * lineTo()
    * drawLine()
    * end()
    * curveTo()
    * lineStyle()
    * beginFill()
    * beginBitmapFill()
    * endFill()
    * drawRect()
    * drawRoundRect()
    * drawComplexRoundRect()
    * drawCircle()
    * drawEllipse()
    * drawPolygone()
    * drawRegularPolygone()
    * drawPath()
    */

I'm not so familiar with Kha to port. If you can do it, it'll be good. We can think about a common wrapper to have OpenFL and Kha backends.