package content

import "github.com/edragoev1/pdfjet/v9/src/content"

Package content reads the contents of files and readers.

Index

Functions

func GetFromStream

func GetFromStream(reader io.Reader) []uint8

GetFromStream returns all the bytes read from the reader. It panics if the reader fails.

func LinesOfTextFile

func LinesOfTextFile(fileName string) []string

LinesOfTextFile returns the lines of a UTF-8 text file, without a byte order mark and without the line separators. An empty line is an empty string. It panics if the file cannot be read.

func OfBinaryFile

func OfBinaryFile(fileName string) []uint8

OfBinaryFile returns the contents of the specified file as bytes. It panics if the file cannot be read.

func OfTextFile

func OfTextFile(fileName string) string

OfTextFile returns the contents of the specified text file. It panics if the file cannot be read.