🚀 Quick Start Guide¶
Welcome to Redoc, the universal document converter! This guide will help you get started with converting documents between various formats in just a few minutes.
Prerequisites¶
- Python 3.8 or higher
- Basic familiarity with command line
- (Optional) Docker for containerized deployment
- (Optional) Tesseract OCR for image text extraction
Your First Conversion¶
Convert a document¶
# Convert PDF to HTML
redoc convert document.pdf document.html
# Convert HTML to PDF
redoc convert page.html output.pdf
Interactive Mode¶
Basic Commands¶
Document Conversion¶
# Basic conversion
redoc convert input.pdf output.html
# Convert with a specific format
redoc convert --from pdf --to html input.pdf output.html
# Process multiple files
redoc batch "documents/*.pdf" --format html --output-dir html_output
Interactive Shell Commands¶
redoc shell
# In the shell:
> help # Show available commands
> convert input.pdf output.html # Convert files
> batch "*.pdf" --format html # Batch process files
> templates list # List available templates
> exit # Exit the shell
Example Workflow: Invoice Generation¶
-
Prepare your data (data.json):
-
Convert JSON to PDF using a template:
-
Extract data from an existing document:
Advanced Examples¶
Batch Processing¶
# Convert all PDFs in a directory to HTML
redoc batch "invoices/*.pdf" --format html --output-dir html_output
# Convert with a template
redoc batch "data/*.json" --template invoice.html --output-dir pdf_invoices
Using Docker¶
# Run a conversion with Docker
docker run -v $(pwd):/data text2doc/redoc convert input.pdf output.html
# Start the web interface
docker run -p 8000:8000 -v $(pwd)/templates:/app/templates text2doc/redoc serve
Next Steps¶
- Learn about templates for custom document generation
- Explore AI-powered features for smart document processing
- Check the API Reference for programmatic usage
- Review the installation guide for advanced setup
Getting Help¶
- Run
redoc --help
for command-line options - Open an issue for bugs or feature requests