mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-09 00:52:14 +01:00
19 lines
389 B
Go
19 lines
389 B
Go
package printer
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/thecodingmachine/gotenberg/internal/pkg/xlog"
|
|
)
|
|
|
|
// 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 chromePrinter{
|
|
logger: logger,
|
|
url: URL,
|
|
opts: opts,
|
|
}
|
|
}
|