Text and details#
Reading a file without drawing it: its text, or what it says about itself, or where a PDF says something. All work without a terminal and write only the answer to standard output. With --json, a PDF page’s text comes with chars and images, and sparse when it is a picture with next to no text, better exported with --output. --grep prints each match’s page and a line around it, not the document.
| Option | Argument | Default | Description |
|---|---|---|---|
--text | take the text out: Markdown of a Word document, page, or notebook, text of a PDF page, CSV of a sheet, text and JSON as they are | ||
--grep | string | search the text layer of a PDF, every page unless –page says, for this regular expression (RE2), and print each match’s page and a line around it; –json for objects | |
--info | print what each file says about itself, and do not open the viewer | ||
--json | with –info, –text, –grep, an export, –pick-web, or –resume, print JSON |
Examples#
# The text of a PDF page
gloss --text --page 4 report.pdf
# The pages of a PDF that mention an invoice, and where
gloss --grep '(?i)invoice' report.pdf
# What files say about themselves, as JSON
gloss --info --json *.pdf model.stl