...
Documentation
Documentation

# Package convert

## Overview ▹

## Overview ▾

## Index ▹

## Index ▾

### Package files

chart.go convert.go fonts.go model.go notes_labels.go textbox.go utils.go

## func ConvertToPdf ¶

    func ConvertToPdf(pr *presentation.Presentation) *creator.Creator

ConvertToPdf converts a presentation to a PDF file. This package is beta, breaking changes can take place.

## func ConvertToPdfWithOptions ¶

    func ConvertToPdfWithOptions(pr *presentation.Presentation, opts *Options) *creator.Creator

ConvertToPdfWithOptions convert a presentation to PDF with given options.

## func RegisterFont ¶

    func RegisterFont(name string, style FontStyle, font *model.PdfFont)

RegisterFont makes a PdfFont accessible for using in converting to PDF.

## func RegisterFontsFromDirectory ¶

    func RegisterFontsFromDirectory(dirName string) error

RegisterFontsFromDirectory registers all fonts from the given directory automatically detecting font families and styles.

## type FontStyle ¶

FontStyle represents a kind of font styling. It can be FontStyle_Regular, FontStyle_Bold, FontStyle_Italic and FontStyle_BoldItalic.

    type FontStyle = convertutils.FontStyle

    const (
        FontStyle_Regular    FontStyle = 0
        FontStyle_Bold       FontStyle = 1
        FontStyle_Italic     FontStyle = 2
        FontStyle_BoldItalic FontStyle = 3
    )

## type Options ¶

Options contains the options for convert process

    type Options struct {
        // DefaultPageSize is applied when there is no page size explicitly set in the document.
        // A4 is the default option.
        DefaultPageSize convertutils.PageSize
    }