Documentation
¶
Index ¶
- type Converter
- func (c *Converter) ConvertDocxToPdf(inputPath, outputPath string) error
- func (c *Converter) ConvertImageToPdf(inputPath, outputPath string) error
- func (c *Converter) ConvertImagesToPdf(inputPaths []string, outputPath string) error
- func (c *Converter) ConvertXlsxToPdf(inputPath, outputPath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct {
FontPath string // Path to a TTF font file
FontFamily string // Font family name to use in PDF
}
Converter provides methods to convert Office documents and images to PDF using pure Go.
func NewConverter ¶
NewConverter returns a new Converter with optional font settings.
func (*Converter) ConvertDocxToPdf ¶
ConvertDocxToPdf converts a DOCX file to a PDF file.
func (*Converter) ConvertImageToPdf ¶
ConvertImageToPdf converts a single image file (JPG, PNG) to a PDF file.
func (*Converter) ConvertImagesToPdf ¶
ConvertImagesToPdf converts multiple image files (JPG, PNG) to a single PDF file (one image per page).
func (*Converter) ConvertXlsxToPdf ¶
ConvertXlsxToPdf converts an XLSX file to a PDF file.
Click to show internal directories.
Click to hide internal directories.