The AI Document Translator is a powerful Next.js application that leverages the Google Gemini Engine to accurately translate .docx, .pdf, .dwg, and image files structurally, preserving 100% of native layouts and boundaries.
We have provided a convenient .bat file to automate setting up the application. Alternatively, you can install the dependencies manually.
- Double-click
install.baton your machine. - Wait for it to finish installing both Node.js packages and the required Python tools automatically.
If you prefer setting it up manually from a terminal:
# 1. Install Node.js dependencies
npm install
# 2. Install Python dependencies
python -m pip install pywin32 pdf2docxDouble-click the run.bat script anytime you want to start the AI Document Translator server. A background terminal will open. Once ready, visit http://localhost:3000 in your browser.
npm run devBefore using the application, you must configure it with a valid Google Gemini API Key. The AI Document Translator utilizes Google's advanced language models to accurately translate native documents and images.
- Navigate to Google AI Studio.
- Sign in with your Google account.
- Click on the Create API key button and copy the generated key string.
Warning
Privacy Guarantee: Your API key is stored exclusively in your browser's local storage. It is never saved to a database, tracked, or sent to any server other than your local machine passing it directly to the official Google Gemini endpoints.
Access the Settings menu by clicking the Settings button in the top right corner of the application interface.
- API Key: Paste your generated key here.
- Model: Select between different Gemini models (e.g., Gemini 3.1 Pro for the highest quality structure retention, or Flash for cost-effective speed).
- Auto-Save to Output Folder: Check this box to instantly route your processed documents directly to the local
Output/folder inside the app directory, entirely overriding standard browser download prompts for a smoother workflow.
- Translated natively strictly preserving Word XML bounds, tables, formatting, margins, and graphics.
- Fast parallel translation.
- Internally converts vector bounds to editable DOCX, translates, and returns an editable Document natively.
- Recreates textual data into raw HTML boundaries, tables, or plaintext extraction seamlessly leveraging Google Gemini Vision models.
-
[!IMPORTANT] AutoCAD is required: Processing and translating
.dwgfiles relies entirely on an active local installation of AutoCAD on the host machine. The python backend connects securely to AutoCAD through the COM interface (pywin32) to perfectly retain layout logic, block attributes, model space, paper space boundaries, and layer names.The translation will happen invisibly in the background. If AutoCAD is closed, the server will launch it automatically.
This project is built using Next.js, running locally to ensure privacy and fast local processing limits.