mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 04:32:15 +01:00
adding test for printer package
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/thecodingmachine/gotenberg/internal/pkg/conf"
|
||||
"github.com/thecodingmachine/gotenberg/internal/pkg/xcontext"
|
||||
"github.com/thecodingmachine/gotenberg/internal/pkg/xerror"
|
||||
"github.com/thecodingmachine/gotenberg/internal/pkg/xexec"
|
||||
@@ -26,6 +27,15 @@ type OfficePrinterOptions struct {
|
||||
Landscape bool
|
||||
}
|
||||
|
||||
// DefaultOfficePrinterOptions returns the default
|
||||
// Office Printer options.
|
||||
func DefaultOfficePrinterOptions(config conf.Config) OfficePrinterOptions {
|
||||
return OfficePrinterOptions{
|
||||
WaitTimeout: config.DefaultWaitTimeout(),
|
||||
Landscape: false,
|
||||
}
|
||||
}
|
||||
|
||||
// NewOfficePrinter returns a Printer which
|
||||
// is able to convert Office documents to PDF.
|
||||
func NewOfficePrinter(logger xlog.Logger, fpaths []string, opts OfficePrinterOptions) Printer {
|
||||
|
||||
Reference in New Issue
Block a user