cmap

package
v0.0.0-...-692e68a Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Utf8CodepointToUtf8

func Utf8CodepointToUtf8(utf8Codepoint uint) string

Types

type CMap

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

CMap represents a character code to unicode mapping used in PDF files.

func LoadCmapFromData

func LoadCmapFromData(data []byte) (*CMap, error)

LoadCmapFromData parses CMap data in memory through a byte vector and returns a CMap which can be used for character code to unicode conversion.

func (*CMap) CharcodeBytesToCidStr

func (cmap *CMap) CharcodeBytesToCidStr(src []byte) string

CharcodeBytesToUnicode converts a byte array of charcodes to a unicode string representation.

func (*CMap) CharcodeBytesToUnicode

func (cmap *CMap) CharcodeBytesToUnicode(src []byte, simpleEncoding []uint, flag bool) string

CharcodeBytesToUnicode converts a byte array of charcodes to a unicode string representation.

func (*CMap) CharcodeToUnicode

func (cmap *CMap) CharcodeToUnicode(srcCode uint64) string

CharcodeToUnicode converts a single character code to unicode string.

func (*CMap) GetCodeMap

func (c *CMap) GetCodeMap() map[uint64]string

func (*CMap) Name

func (cmap *CMap) Name() string

Name returns the name of the CMap.

func (*CMap) Type

func (cmap *CMap) Type() int

Type returns the type of the CMap.

Jump to

Keyboard shortcuts

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