How to extract plain text from PDF in golang
问题 I want to extract text from pdf file using GO. I tried using ledongthuc/pdf Go package that implement the method GetPlainText() to get plain text content without format. But I don't get the plain text. I have as a result: W S D V Y R O R Q W D L U H P H Q W ...... Go code package main import ( "bytes" "fmt" "github.com/ledongthuc/pdf" ) func main() { content, err := readPdf("test.pdf") if err != nil { panic(err) } fmt.Println(content) return } func readPdf(path string) (string, error) { r,