# ============================================================================ # xPDF Fastify Plugin - Environment Configuration # ============================================================================ # This file defines environment variables for the xPDF module. # Copy this to .env and update values for your environment. # ============================================================================ # ============================================================================ # SERVER CONFIGURATION # ============================================================================ # Server port (default: 3000) PORT=3000 # Node environment (development | production | test) NODE_ENV=development # Server hostname/domain (used in example server) DOMAIN=http://localhost:3000 # ============================================================================ # PUPPETEER CONFIGURATION # ============================================================================ # Optional - uses sensible defaults if not provided # Run in headless mode (true | false) # Default: true # Set to false for debugging (displays browser window) PUPPETEER_HEADLESS=true # Chrome/Chromium launch arguments (comma-separated) # Default: --no-sandbox,--disable-setuid-sandbox # Examples: # Production: --no-sandbox,--disable-dev-shm-usage # Docker: --no-sandbox,--disable-gpu # PUPPETEER_ARGS=--no-sandbox,--disable-setuid-sandbox # Path to Chromium/Chrome executable # Leave empty to auto-detect or use system-installed browser # Example: /usr/bin/chromium-browser # PUPPETEER_EXECUTABLE_PATH= # Timeout for page operations in milliseconds (default: 30000) # PUPPETEER_TIMEOUT=30000 # ============================================================================ # xPDF PLUGIN CONFIGURATION # ============================================================================ # Default PDF page format # Options: A4, Letter, A3, A5, Tabloid, Ledger # Default: A4 PDF_DEFAULT_FORMAT=A4 # Default page margins (in CSS units: cm, mm, in, px) # Default: 1cm on all sides # PDF_MARGIN_TOP=1cm # PDF_MARGIN_RIGHT=1cm # PDF_MARGIN_BOTTOM=1cm # PDF_MARGIN_LEFT=1cm # Print background graphics and colors # Default: true # PDF_PRINT_BACKGROUND=true # ============================================================================ # xSTORAGE INTEGRATION (Optional) # ============================================================================ # Only required if PDF_USE_STORAGE=true # Enable saving PDFs to xStorage (S3-compatible storage) # Default: false # Set to true to automatically save generated/merged PDFs PDF_USE_STORAGE=false # Default folder in storage for saved PDFs # Default: pdfs PDF_DEFAULT_FOLDER=pdfs # S3-Compatible Storage Endpoint # Example: https://s3.amazonaws.com or https://minio.example.com # STORAGE_ENDPOINT=https://s3.amazonaws.com # AWS Region or storage provider region # Example: us-east-1, us-west-2, auto # STORAGE_REGION=us-east-1 # Access Key ID for S3-compatible storage # STORAGE_ACCESS_KEY_ID=your_access_key # Secret Access Key for S3-compatible storage # STORAGE_SECRET_ACCESS_KEY=your_secret_key # S3 Bucket name # STORAGE_BUCKET=my-pdfs-bucket # Public URL for accessing stored files # Used in response URLs when PDF is saved to storage # Example: https://cdn.example.com/pdfs or https://my-bucket.s3.amazonaws.com # STORAGE_PUBLIC_URL=https://my-bucket.s3.amazonaws.com # ============================================================================ # LOGGING & MONITORING # ============================================================================ # Fastify logger level (trace, debug, info, warn, error, fatal) LOG_LEVEL=info # Enable request logging # LOG_REQUESTS=true # ============================================================================ # SECURITY & RATE LIMITING (for HTTP endpoints) # ============================================================================ # Enable HTTPS enforcement (if behind reverse proxy) # HTTPS_ONLY=false # Rate limiting: max requests per minute # RATE_LIMIT_WINDOW=1m # RATE_LIMIT_MAX=100