Deploy PDFMathTranslate on Pethost in one click
Translates scientific PDFs and keeps their formulas, charts and layout
What happens
- You sign in to Pethost or make an account, with a passkey, GitHub or Google.
- No machine yet? You pick a plan, and we prepare one for you. The link waits in your browser until it is ready.
- New project opens at the app. You fill in what it asks for and click Create project: Admin password.
- In a minute or two the app is live at its own address with HTTPS. Its secrets are made for it at random, and its data is in the nightly backup.
- It is a project like any other: its compose.yaml, its .env, its logs and a terminal are in the panel, and your agent can change it, roll it back or restore it.
First steps
Sign in as admin with the admin password you gave; it must have no comma. Pick Bing as the service to translate with no key: Google's free service often refuses a server's address. For DeepL, OpenAI and the others, enter a key on the page.
What it runs
The template is this compose.yaml and the variables it writes into the project’s .env. Pethost runs the file as it is written.
services:
pdf2zh:
image: byaidu/pdf2zh:1.9.11
restart: unless-stopped
environment:
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
# Without a file of users the web page is open to anyone with the address, and each visitor's
# PDFs are translated on this machine: the user admin with the password given is the only one.
entrypoint:
- sh
- -c
- |
printf 'admin,%s\n' "$$ADMIN_PASSWORD" > /tmp/users.txt
exec pdf2zh -i --authorized /tmp/users.txt
volumes:
# The services' settings and API keys entered on the page.
- config:/root/.config/PDFMathTranslate
volumes:
config:
