General Introduction
serverless-markdown-convertor is a free open source tool based on Cloudflare Worker and Workers AI development, can convert a variety of files into Markdown format. It supports PDF, images, Office documents, HTML and other common file types, no need to build their own servers, users can get the code through GitHub to deploy themselves. This tool uses AI technology to optimize the conversion effect, such as extracting the text of the picture or processing complex forms, suitable for organizing documents, extracting content or migrating data scenarios. Simple to operate and easy to deploy, it is a practical choice for efficient file processing.
Function List
- Supports conversion of a wide range of files to Markdown, including PDF, images, HTML, XML, Office documents and more.
- Use Cloudflare Workers AI to provide intelligent features like text extraction, object detection, and more.
- Based on a serverless architecture, it runs in the Cloudflare cloud with no hardware to maintain.
- Open source project that allows users to fork and customize features via GitHub.
- Supports password protection to prevent unauthorized access.
- Provides standardized Markdown output, compatible with common editors.
Using Help
serverless-markdown-convertor can quickly convert files to Markdown, relying on Cloudflare's technical support. Here is a detailed description of how to deploy and use it.
Installation and Deployment Process
- Project Fork
show (a ticket) GitHub project addressClick the "Fork" button to copy the repository to your account. - Creating a Cloudflare Worker
- Log in to your Cloudflare account and go to the "Workers" page.
- Click "Create Worker" and select the "HTTP Handler" template.
- Connecting to Fork's repositories
- In the Worker settings, select "Connect to GitHub repositories".
- Find your Fork.
serverless-markdown-convertor
Warehouse, confirm connection.
- Save and deploy
- Click "Save and Deploy" and Cloudflare will automatically build the project.
- After the deployment is complete, the system will assign a default domain name (e.g.
your-project.workers.dev
).
- Add custom domain name (optional)
- In Worker Settings, click Add Custom Domain.
- Enter your domain name (you need to register it in Cloudflare first) and save the settings.
- Setting up password protection
- Add a variable to the "Environment Variables" in the Worker settings:
PASSWORD = "你的强密码"
- Example password:
681e3362d68c4ac987215a6367dd44de
(It is recommended to use your own strong password to avoid abuse). - After redeployment, a password is required for access.
- Add a variable to the "Environment Variables" in the Worker settings:
- access service
- Deployment is complete, access your domain (default or custom), enter your password and you're ready to go.
How to use the main features
file conversion
- Uploading files: Open your worker URL (e.g.
https://your-project.workers.dev
), the page displays the upload area. Click to select a file or drag and drop a file. - Supported file types::
- PDF:
.pdf
- Picture:
.jpeg
,.jpg
,.png
,.webp
,.svg
- HTML:
.html
- XML:
.xml
- Office documents:
.xlsx
,.xlsm
,.xlsb
,.xls
,.et
- Open Documentation:
.ods
- CSV:
.csv
- Apple Documentation:
.numbers
- PDF:
- conversion operation: After uploading and clicking "Convert", the tool will process the file and generate Markdown.
- Download results: When the conversion is complete, the page provides a link to download the Markdown file and save it locally.
AI enhancements
- text extractionWorkers AI recognizes text and converts it to Markdown when you upload an image, for example, scanned handwritten notes can be turned directly into text.
- object detection: For complex documents (e.g., PDFs with images), AI can detect the image content and describe it.
- procedure: After uploading the file, select "AI Enhancement" (depending on the interface support) to get smarter results after conversion.
- Description of restrictions: AI features are free, but exceed the Cloudflare free amount (see specificallypricing page) will incur costs.
Demo Use
- Demo Address:: https://mdcdemo.2020818.xyz/
- cryptographic::
681e3362d68c4ac987215a6367dd44de
- take note of: Demo may be closed due to overuse, it is recommended to deploy it on your own.
Example of operation process
Suppose you want to convert a PDF with images:
- Access your Worker URL.
- Click "Select File" to upload the PDF.
- Click "Convert" and wait a few seconds.
- The result displays Markdown text and the image content is embedded as a text description.
- Click on "Download" and save.
.md
Documentation. - Open it for viewing with a Markdown editor such as VS Code.
caveat
- file sizeCloudflare Worker Free Edition is limited to 10MB, oversized files need to be split.
- cost: Basic conversions are free, AI functions are charged beyond the free amount (seepricing page).
- error detection: When the conversion fails, check the file format or view the Worker log (Cloudflare console).
- safety: Be sure to set strong passwords to avoid cost overruns due to misuse of the service.
More technical details can be found in the official Cloudflare documentation:Markdown conversion instructionsThe
application scenario
- Documentation
Convert PDF and Office files to Markdown for unified archiving to note-taking software. - content extraction
Convert text from images or scans to Markdown for quick blogging or sharing. - data migration
Convert CSV or Excel files to Markdown for import into other platforms. - development and debugging
Developers use it to test Workers AI conversions and optimize their tools.
QA
- What file formats are supported?
Support for PDF, images (.jpg
,.png
etc.), HTML, XML, Office documents (.xlsx
etc.), CSV,.ods
,.numbers
etc. - Why did the conversion fail?
It is possible that the file is corrupt, in an unsupported format, or has exceeded the size limit. Check the file and view the Worker log. - Do you charge for AI features?
There is no charge for the free amount and Cloudflare pricing applies after that. - What if I can't access Demo?
Demo may be closed due to excessive traffic, it is recommended that Fork projects deploy themselves.