<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Document Intelligence

## ExifTool

### Full Metadata
```bash
exiftool -json document.pdf | jq '.[0]'
```

### Specific Fields
```bash
exiftool -Author -Creator -Producer -Company -CreateDate -ModifyDate document.pdf
```

### Batch CSV Export
```bash
exiftool -r -csv -Author -Creator -Producer -Software -Company ./docs/ > metadata.csv
```

### Strip All Metadata
```bash
exiftool -all= document.pdf
```

## metagoofil

### Harvest Documents
```bash
metagoofil -d example.com -t pdf,doc,docx,xls,xlsx,ppt,pptx -l 200 -n 50 -o ./docs/
```

### Specific File Types
```bash
metagoofil -d example.com -t pdf -l 100 -o ./pdfs/
```

## pdfinfo / pdftools

### PDF Metadata
```bash
pdfinfo document.pdf
```

### PDF Parser
```bash
pdf-parser -s /Author document.pdf
pdf-parser --object 1 --filter document.pdf
```

### PDF ID (Malware Indicators)
```bash
pdfid document.pdf
```

## oletools

### VBA Macro Extraction
```bash
olevba document.docm
```

### Embedded Objects
```bash
oleobj document.docx
```

### Metadata
```bash
python3 -c "import oletools.olemeta; oletools.olemeta.main(['document.doc'])"
```

## Apache Tika

### Extract Metadata
```bash
java -jar tika-app.jar -m document.pdf
```

### Extract Text
```bash
java -jar tika-app.jar -t document.pdf
```

### JSON Output
```bash
java -jar tika-app.jar -j document.pdf
```

## python-docx

### Read Metadata
```python
from docx import Document
doc = Document('file.docx')
props = doc.core_properties
print(props.author, props.created, props.modified)
```

## Environment Variables

| Variable | Description |
|----------|-------------|
| No API keys required | All tools are local/offline |
