Documentation ¶
Index ¶
Constants ¶
const MissingCodeRune = textencoding.MissingCodeRune
MissingCodeRune replaces runes that can't be decoded. '\ufffd' = �. Was '?'.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CIDSystemInfo ¶
CIDSystemInfo=Dict("Registry": Adobe, "Ordering": Korea1, "Supplement": 0, )
func NewCIDSystemInfo ¶
func NewCIDSystemInfo(obj core.PdfObject) (info CIDSystemInfo, err error)
NewCIDSystemInfo returns the CIDSystemInfo encoded in PDFObject `obj`.
func (*CIDSystemInfo) String ¶
func (info *CIDSystemInfo) String() string
String returns a human readable description of `info`. It looks like "Adobe-Japan2-000".
type CMap ¶
type CMap struct {
// contains filtered or unexported fields
}
CMap represents a character code to unicode mapping used in PDF files. References:
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/5411.ToUnicode.pdf https://github.com/adobe-type-tools/cmap-resources/releases
func LoadCmapFromData ¶
LoadCmapFromData parses the in-memory cmap `data` and returns the resulting CMap. If `isSimple` is true, it uses 1-byte encodings, otherwise it uses the codespaces in the cmap.
9.10.3 ToUnicode CMaps (page 293).
func LoadCmapFromDataCID ¶
LoadCmapFromDataCID parses the in-memory cmap `data` and returns the resulting CMap. It is a convenience function.
func NewToUnicodeCMap ¶
NewToUnicodeCMap returns an identity CMap with codeToUnicode matching the `codeToUnicode` arg.
func (*CMap) CharcodeBytesToUnicode ¶
CharcodeBytesToUnicode converts a byte array of charcodes to a unicode string representation. It also returns a bool flag to tell if the conversion was successful. NOTE: This only works for ToUnicode cmaps.
func (*CMap) CharcodeToUnicode ¶
CharcodeToUnicode converts a single character code `code` to a unicode string. If `code` is not in the unicode map, '�' is returned. NOTE: CharcodeBytesToUnicode is typically more efficient.
type CharCode ¶
type CharCode uint32
CharCode is a character code or Unicode rune is int32 https://golang.org/doc/go1#rune