Laravel Anydoc Rust
Laravel Anydoc Rust converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF files to Markdown from Laravel Rust.
On this page
Laravel Anydoc Rust converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF files to GitHub-Flavored Markdown, or to anydoc's document model, from Laravel Rust. It reads local files, uploads, bytes, and files on storage disks, and sends scanned PDFs to Firecrawl for OCR when you ask it to.
Quick start
After installing the package, receive Anydoc with Inject<Anydoc> and convert a file:
rust
use laravel::prelude::*;
use laravel_anydoc::Anydoc;
pub async fn show(anydoc: Inject<Anydoc>) -> laravel::Result<String> {
anydoc.file("storage/app/report.docx").markdown().await
}Supported formats
| Format | Extensions |
|---|---|
| CSV | .csv |
| EPUB | .epub |
| Excel | .xls, .xlsb, .xlsm, .xlsx |
| OpenDocument | .odp, .ods, .odt |
.pdf |
|
| PowerPoint | .pot, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx |
| Rich Text Format | .rtf |
| Word | .doc, .docm, .docx |
Next steps
- Converting documents covers local files, uploads, and bytes.
- Storage disks converts files on the application's filesystem disks, such as S3.
- Formats and output explains format detection and anydoc's document model.
- Handling errors explains why a conversion fails and how to respond.
- Testing swaps a fake
Anydocinto application tests. - OCR sends scanned PDFs to Firecrawl.
- Configuration lists the Firecrawl settings and the size limit.