huge refactoring

This commit is contained in:
Julien Neuhart
2019-07-23 13:57:18 +02:00
parent f6b357691c
commit 7bfbda4490
105 changed files with 4051 additions and 2667 deletions

View File

@@ -2,13 +2,17 @@ package printer
import (
"fmt"
"github.com/thecodingmachine/gotenberg/internal/pkg/xlog"
)
// NewHTML returns an HTML printer.
func NewHTML(fpath string, opts *ChromeOptions) Printer {
// NewHTMLPrinter returns a Printer which
// is able to convert an HTML file to PDF.
func NewHTMLPrinter(logger xlog.Logger, fpath string, opts ChromePrinterOptions) Printer {
URL := fmt.Sprintf("file://%s", fpath)
return &chrome{
url: URL,
opts: opts,
return chromePrinter{
logger: logger,
url: URL,
opts: opts,
}
}