diff --git a/README.md b/README.md index 2b01429..162ac27 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # PDF Reader -A simple Go library which enables reading PDF files. Forked from https://github.com/rsc/pdf +A simple Go library which enables reading PDF files. + +This repository contains merged code from https://github.com/rsc/pdf and https://github.com/ledongthuc/pdf Features - - Get plain text content (without format) + - Get plain text content (without formatting) - Get Content (including all font and formatting information) ## Install: @@ -131,6 +133,3 @@ func readPdf(path string) (string, error) { return "", nil } ``` - -## Demo -![Run example](https://i.gyazo.com/01fbc539e9872593e0ff6bac7e954e6d.gif) diff --git a/page.go b/page.go index d452547..9b15a79 100644 --- a/page.go +++ b/page.go @@ -924,7 +924,7 @@ func (p Page) Content() Content { g.Tm = matrix{{1, 0, 0}, {0, 1, 0}, {tx, 0, 1}}.mul(g.Tm) } } - showText("\n") + //showText("\n") case "TL": // set text leading if len(args) != 1 { diff --git a/read.go b/read.go index 7905639..489fcad 100644 --- a/read.go +++ b/read.go @@ -193,6 +193,7 @@ func (r *Reader) Trailer() Value { if r == nil { return Value{} } + return Value{r, r.trailerptr, r.trailer} } @@ -343,6 +344,7 @@ func readXrefStreamData(r *Reader, strm stream, table []xref, size int64) ([]xre } } } + return table, nil }