encoder

package
v0.0.0-...-11fa6ca Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

Variables

View Source
var (
	PdfDocEncoding = [256]rune{}/* 256 elements not displayed */

)

See PDF 32000-1:2008, Table D.2

Functions

func IsPDFDocEncoded

func IsPDFDocEncoded(s string) bool

func IsUTF16

func IsUTF16(s string) bool

func PdfDocDecode

func PdfDocDecode(s string) string

func Utf16Decode

func Utf16Decode(s string) string

Types

type ByteEncoder

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

func NewMacRomanEncoding

func NewMacRomanEncoding() *ByteEncoder

func NewPDFDocEncoding

func NewPDFDocEncoding() *ByteEncoder

func NewWinAnsiEncoding

func NewWinAnsiEncoding() *ByteEncoder

func (*ByteEncoder) Decode

func (e *ByteEncoder) Decode(raw string) (text string)

type CMap

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

func ParseCmap

func ParseCmap(cmapBytes []byte) (*CMap, error)

func (*CMap) Decode

func (cm *CMap) Decode(raw string) string

func (*CMap) Merge

func (cm *CMap) Merge(other *CMap)

type NoOpEncoder

type NoOpEncoder struct{}

func (*NoOpEncoder) Decode

func (e *NoOpEncoder) Decode(raw string) string

type StructedCMap

type StructedCMap struct {
	MapCount int
	Mapping  []string
}

func (*StructedCMap) Push

func (s *StructedCMap) Push(hex string)

type TextEncoding

type TextEncoding interface {
	Decode(raw string) string
}

type Token

type Token struct {
	Type  string
	Value string
}

type Tokenizer

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

func NewTokenizer

func NewTokenizer(r io.Reader) *Tokenizer

func (*Tokenizer) Tokenize

func (t *Tokenizer) Tokenize() ([]Token, error)

Jump to

Keyboard shortcuts

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