FileLens Documentation

FileLens is a high-performance file preview generation service that provides multi-page document processing with download URL responses. Generate previews from various file formats including documents, images, and videos with support for 450+ file formats.

Getting started

FileLens supports both synchronous and asynchronous processing with multi-page document handling. The service returns download URLs instead of base64 encoded data for better performance and supports configurable output dimensions, quality, and processing options.

Key Features

  • Multi-page Document Processing: Generate previews for every page in PDF, DOC, DOCX, PPT, PPTX files
  • Download URL Responses: Returns download URLs instead of base64 encoded data for better performance
  • Asynchronous Processing: Support for both sync and async operations
  • Wide Format Support: 450+ file formats supported including documents, images, and videos
  • Flexible Configuration: Customizable output dimensions, quality, and processing options
  • Docker Ready: Easy deployment with Docker and Docker Compose
  • Client Libraries: Available for JavaScript, Python, PHP, and more

Supported Formats

Documents

  • PDF: Portable Document Format
  • Microsoft Office: DOC, DOCX, XLS, XLSX, PPT, PPTX
  • OpenDocument: ODT, ODS, ODP
  • Rich Text: RTF, TXT

Images

  • Common Formats: JPG, PNG, GIF, BMP, TIFF, WebP
  • Vector Graphics: SVG, EPS
  • Raw Images: CR2, NEF, ARW, DNG

Videos

  • Common Formats: MP4, AVI, MOV, WMV, FLV
  • Web Formats: WebM, OGV
  • Mobile Formats: 3GP, M4V

Quick Examples

Generate PDF Preview

curl -X POST http://localhost:3000/preview \
  -H "Content-Type: application/json" \
  -d '{
    "input": "https://example.com/document.pdf",
    "output_format": "jpg",
    "options": {
      "width": 800,
      "height": 600,
      "all_pages": false // default is true, set to false to generate preview for the first page only
    }
  }'

JavaScript Client

import { FileLensClient } from 'filelens-client';

const client = new FileLensClient('http://localhost:3000');
const result = await client.generatePreview(
  'https://example.com/document.pdf',
  { width: 800, height: 600, format: 'jpg' }
);

Python Client

from filelens_client import FileLensClient

client = FileLensClient('http://localhost:3000')
result = client.generate_preview(
    'https://example.com/document.pdf',
    width=800, height=600, format='jpg'
)

Guides

Quickstart

Get started with FileLens in minutes with our quick setup guide.

Read more

Implementation

Complete integration guide with code examples for popular languages.

Read more

Multi-Page Processing

Learn how to process all pages in PDF, DOC, DOCX, PPT, PPTX files.

Read more

Docker Deployment

Deploy FileLens using Docker with production-ready configurations.

Read more

Resources

API Reference

Complete API documentation with endpoints, request/response formats, and examples.

Preview Generation

Learn how to generate file previews synchronously and asynchronously with detailed examples.

Status & Monitoring

Monitor service health, job processing status, and integrate with monitoring tools.