https://github.com/zotero/cross-xpdf
https://github.com/zotero/cross-xpdf
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/zotero/cross-xpdf
- Owner: zotero
- Created: 2018-02-05T20:08:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-04-04T22:00:59.000Z (about 4 years ago)
- Last Synced: 2024-04-08T18:24:48.512Z (about 2 years ago)
- Language: C++
- Size: 53.7 KB
- Stars: 8
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
`cross-xpdf` compiles [xpdf PDF tools](https://www.xpdfreader.com/) for macOS (x64), Windows (x86, x64), Linux (x86, x64).
This is only intended to be used for `pdfinfo` and `pdftotext`.
### pdfinfo
`pdfinfo` is modified to output to a specified file.
### pdftotext
`pdftotext` is modified to output a preprocessed JSON that contains rich and structured information about the PDF and the text extracted from it:
- PDF metadata
- Page dimensions
- Page count
- Word position
- Font size
- Space after word
- Baseline
- Rotation
- Bold
- Italic
- Color
- Font
Also, a command line switch is added to customize the path to `poppler-data` directory.
### Build
PDF tools are build inside the Docker container.
macOS 10.11 SDK is needed. Place `MacOSX10.11.sdk.tar.xz` to the current directory. [Extract it from Xcode 7.3](https://github.com/tpoechtrager/osxcross#packaging-the-sdk).
```
git clone https://github.com/zotero/cross-xpdf
cd cross-xpdf
mv path_to_sdk/MacOSX10.11.sdk.tar.xz ./
./build.sh
```
`./build/pdftools.tar.gz` contains the built binaries and `poppler-data` directory.