Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

extract-text

The simplest ParseRails example — open a PDF and print its text plus a few word bounding boxes, using the default cgo-free WASM backend.

go run . sample.pdf
backend=wasm pages=1 words=42

p0 "ParseRails"          [73 739 251 748]
p0 "Benchmark"          ...
...

Docker

The Dockerfile builds a fully static binary with CGO_ENABLED=0 on distroless/static — no system libraries, because PDFium ships as WASM.

Build from the repo root (the replace directive needs the parent source in context — no need to publish the module):

docker build -f examples/extract-text/Dockerfile -t parserails-extract .
docker run --rm -v "$PWD:/data" parserails-extract /data/sample.pdf