add new feature to set progress callback
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package html2pdf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -46,6 +47,10 @@ func TestConvertFiles(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
c.SetProgressCallback(func(progress int) {
|
||||
fmt.Println(progress)
|
||||
})
|
||||
|
||||
if err := c.Convert(input...); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user