APDF is a lightweight internal-network PDF utility server for assembling and editing PDF files.
It is designed for short-lived internal use, not as a long-term document storage system.
- Upload PDFs into a browser-session source cache by choosing files or dragging PDFs onto the source list.
- Select page ranges directly in the source list.
- Reorder or remove source PDFs.
- Build a new PDF from the current source list.
- Small synchronous results download immediately after Build.
- Load and preview a PDF with PDF.js by choosing a file or dragging a PDF onto the Edit PDF section.
- Change preview zoom.
- Inspect and pin PDF coordinates from the preview.
- Apply edit tools immediately.
- Undo recent edits.
- Download the latest edited PDF.
Current edit tools:
- Insert blank page
- Insert image as page
- Append another PDF
- Rotate pages
- Delete pages
- Move pages
- Add text overlay
- Add image overlay
docker compose up -d --buildThis starts APDF and runs the smoke checker once after the APDF container becomes healthy. Smoke check output is written to:
debug/.log
Open:
http://SERVER_IP:8000
Restart APDF only:
docker compose restart apdfRun the smoke checker again:
docker compose up smoke- Open
/assemble. - Click Add PDFs to Sources or drag PDFs onto the source list.
- Reorder source PDFs with the up/down buttons if needed.
- Set the First/Last page range for each source.
- Remove unwanted sources if needed.
- Click Build PDF.
- Small synchronous results download immediately. Larger/background results open the result page.
Page numbers are 1-based.
- Open
/edit. - Click Choose PDF to Edit or drag a PDF onto the Edit PDF section.
- Select a PDF.
- Choose a tool from the tool carousel.
- Configure the tool in the Details panel.
- Click the tool action button.
- APDF applies the edit immediately and refreshes the preview.
- Use Undo if needed.
- Click Download PDF.
After an edit, APDF tries to keep the current preview page.
Page range inputs in Edit tools accept all, open ranges such as 10- and -40, and empty input as all.
The preview coordinate display uses:
unit: PDF point
origin: bottom-left
Text and image overlay tools can use coordinates selected by clicking the PDF preview.
APDF uses temporary storage under:
app/data/
├── clients/ # browser-session source cache
└── jobs/ # generated output jobs
Default expiration:
Job outputs: 2 hours
Client source cache: 6 hours
APDF_JOB_EXPIRE_SECONDS
APDF_CLIENT_EXPIRE_SECONDS
APDF_MAX_INLINE_BYTES
APDF_MAX_INLINE_PAGES
APDF_CODE_LENGTH
APDF_CODE_ALPHABET
APDF_DATA_DIR
APDF_FONTS_DIR
APDF_ACCESS_LOG_DIR
APDF_LOG_TZ
For Korean text overlay, place a supported Korean font in fonts/.
Recommended:
fonts/NotoSansKR-Regular.ttf
Also supported:
fonts/NotoSansCJKkr-Regular.otf
Tool icons can be placed under:
app/static/icons/
Recommended filenames:
tool-blank.png
tool-image-page.png
tool-append.png # optional; current UI may reuse another document icon
tool-rotate.png
tool-delete.png
tool-move.png
tool-text.png
tool-image-overlay.png
The Edit page expects:
app/static/pdfjs/pdf.mjs
app/static/pdfjs/pdf.worker.mjs
Docker Compose runs the smoke checker once on startup through the smoke service.
The debug directory is mounted into the smoke container, and the latest smoke output is saved at:
debug/.log
View smoke logs:
docker compose logs smokeRun smoke manually on the host:
python tools/apdf_smoke_check.py --base-url http://127.0.0.1:8000 --pdf tools/test.pdf --expect-legacy-removedGET /
GET /assemble
GET /edit
GET /job/{code}
POST /lookup
GET /download/{code}/{filename}
POST /delete-job/{code}
GET /api/clients/{client_id}/sources
POST /api/clients/{client_id}/sources
DELETE /api/clients/{client_id}/sources
DELETE /api/clients/{client_id}/sources/{source_id}
POST /compose
POST /edit/apply
Legacy standalone endpoints such as /merge, /extract, /delete, /rotate, /split, /overlay/text, and /overlay/image are not part of the current UI workflow.
- APDF is intended for trusted internal networks.
- Uploaded source files and generated outputs expire automatically.
- Undo history is temporary and browser-side.
- Result codes are convenient access codes, not strong authentication.