implementation

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestroyLibrary

func DestroyLibrary()

func InitLibrary

func InitLibrary()

func StartPlugin

func StartPlugin()

Types

type Pdfium

type Pdfium struct {
	// contains filtered or unexported fields
}

Here is the real implementation of Pdfium

func (*Pdfium) Close

func (p *Pdfium) Close() error

Close closes the internal references in FPDF

func (*Pdfium) GetMetadata added in v0.4.0

func (p *Pdfium) GetMetadata(request *requests.GetMetadata) (*responses.GetMetadata, error)

GetMetadata returns the requested metadata

func (*Pdfium) GetPageCount

func (p *Pdfium) GetPageCount(request *requests.GetPageCount) (*responses.GetPageCount, error)

GetPageCount counts the amount of pages

func (*Pdfium) GetPageSize

func (p *Pdfium) GetPageSize(request *requests.GetPageSize) (*responses.GetPageSize, error)

GetPageSize returns the page size in points One point is 1/72 inch (around 0.3528 mm)

func (*Pdfium) GetPageSizeInPixels

func (p *Pdfium) GetPageSizeInPixels(request *requests.GetPageSizeInPixels) (*responses.GetPageSizeInPixels, error)

GetPageSizeInPixels returns the pixel size of a page given the page number and the DPI.

func (*Pdfium) GetPageText

func (p *Pdfium) GetPageText(request *requests.GetPageText) (*responses.GetPageText, error)

GetPageText returns the text of a page

func (*Pdfium) GetPageTextStructured

func (p *Pdfium) GetPageTextStructured(request *requests.GetPageTextStructured) (*responses.GetPageTextStructured, error)

GetPageTextStructured returns the text of a page in a structured way

func (*Pdfium) Lock

func (p *Pdfium) Lock()

func (*Pdfium) OpenDocument

func (p *Pdfium) OpenDocument(request *requests.OpenDocument) error

func (*Pdfium) Ping

func (p *Pdfium) Ping() (string, error)

func (*Pdfium) RenderPageInDPI

func (p *Pdfium) RenderPageInDPI(request *requests.RenderPageInDPI) (*responses.RenderPage, error)

RenderPageInDPI renders a specific page in a specific dpi, the result is an image.

func (*Pdfium) RenderPageInPixels

func (p *Pdfium) RenderPageInPixels(request *requests.RenderPageInPixels) (*responses.RenderPage, error)

RenderPageInPixels renders a specific page in a specific pixel size, the result is an image. The given resolution is a maximum, we automatically calculate either the width or the height to make sure it stays withing the maximum resolution.

func (*Pdfium) RenderPagesInDPI

func (p *Pdfium) RenderPagesInDPI(request *requests.RenderPagesInDPI) (*responses.RenderPages, error)

RenderPagesInDPI renders a list of pages in a specific dpi, the result is an image.

func (*Pdfium) RenderPagesInPixels

func (p *Pdfium) RenderPagesInPixels(request *requests.RenderPagesInPixels) (*responses.RenderPages, error)

RenderPagesInPixels renders a list of pages in a specific pixel size, the result is an image. The given resolution is a maximum, we automatically calculate either the width or the height to make sure it stays withing the maximum resolution.

func (*Pdfium) RenderToFile

func (p *Pdfium) RenderToFile(request *requests.RenderToFile) (*responses.RenderToFile, error)

func (*Pdfium) Unlock

func (p *Pdfium) Unlock()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL