Legal document workflows have specific format requirements that generic file handling doesn't cover well. A contract drafted in DOCX needs to become a flat, uneditable PDF before signing. Scanned exhibits need consistent format before Bates stamping. eDiscovery productions require specific format specifications — TIFF or PDF, with load files, at defined resolution. Every step involves format conversion, and the tooling to do it reliably is either expensive enterprise software or a maintenance burden you didn't sign up for.
The document format problem in legal work
Legal work generates an unusual volume of document format friction. A few examples that come up constantly:
- Contract finalization — drafts live in DOCX (for tracked changes and collaboration), but executed versions must be PDF. The conversion has to preserve formatting exactly — a line break in the wrong place can change the meaning of a numbered clause.
- eDiscovery production — opposing counsel or a discovery vendor specifies TIFF Group 4 at 300 DPI, or PDF/A. Your documents are in a mix of DOCX, MSG, XLSX, and HEIC. Each format needs to go through a different conversion path.
- Court filings — many courts require PDF/A for archival filings, with embedded fonts and no external dependencies. Standard PDF exports from Word don't always produce conformant PDF/A.
- Exhibit preparation — photos from clients arrive as HEIC (iPhone), PNG screenshots, or scanned TIFFs. They need consistent JPG or PDF format before stamping and production.
- Vendor handoffs — litigation support vendors often require specific formats. Getting documents from your DMS into the right format for a vendor is a conversion step that happens on every case.
None of this is intellectually interesting work. It's format conversion — and it needs to be reliable and auditable.
Common format pairs in legal workflows
These are the conversion routes legal teams actually need:
- DOCX → PDF — finalize contracts, briefs, and correspondence for execution or filing. The most common legal conversion by volume.
- DOC → PDF — legacy Word documents from older matters or opposing party productions.
- DOCX → RTF — some case management systems require RTF import; RTF preserves more formatting than plain text for document round-trips.
- PPTX → PDF — demonstrative exhibits, closing argument slides, client presentations.
- XLSX → PDF — damages calculations, billing summaries, financial exhibits.
- XLSX → CSV — exporting billing or time data for analysis or import into matter management systems.
- PDF → JPG / PNG — generating image previews of documents for review platforms or quick visual inspection.
- HEIC → JPG — normalizing client-provided iPhone photos for production or exhibit preparation.
- TIFF → PDF — converting scanned document TIFFs into searchable PDFs for review.
- JPG / PNG → PDF — combining exhibit images into single-page PDFs for filing or production.
The browser tool: secure for sensitive documents
For one-off conversions involving sensitive legal documents, the browser tool at changethisfile.com is worth understanding. Document-to-document conversions (DOCX → PDF, XLSX → CSV) run server-side — files are uploaded, converted, and auto-deleted. Image conversions (HEIC → JPG, JPG → PDF) run client-side in the browser, so files never leave the device.
The browser tool is appropriate for:
- Ad hoc conversions during document review — one DOCX that needs to be PDF right now
- Checking whether a conversion preserves formatting before running it in bulk via API
- Small-volume exhibit preparation when the API isn't worth setting up
For production sets, automated pipelines, or anything with volume, the API is the right approach.
API integration for legal document pipelines
The endpoint is POST https://changethisfile.com/v1/convert. One POST with the file and target format — source is auto-detected from the filename. No SDK to install. Get a free API key.
Basic conversion
curl -X POST https://changethisfile.com/v1/convert \
-H "Authorization: Bearer ctf_sk_your_key" \
-F "file=@engagement_letter.docx" \
-F "target=pdf" \
--output engagement_letter.pdf
Idempotency keys for reliable pipelines
Legal document pipelines often retry on failure. Use Idempotency-Key to prevent double-processing — if the same key is submitted twice within 24 hours, the second request returns the cached result without billing twice.
curl -X POST https://changethisfile.com/v1/convert \
-H "Authorization: Bearer ctf_sk_your_key" \
-H "Idempotency-Key: matter-2024-cv-1234-exhibit-A" \
-F "file=@exhibit_a.docx" \
-F "target=pdf" \
--output exhibit_a.pdf
Async mode for large document sets
For bulk eDiscovery conversions or large files (scanned multi-page TIFFs), use async mode with webhooks so your pipeline doesn't time out waiting for each conversion.
curl -X POST https://changethisfile.com/v1/convert \
-H "Authorization: Bearer ctf_sk_your_key" \
-F "file=@deposition_transcript.docx" \
-F "target=pdf" \
-F "async=true" \
-F "webhook_url=https://your-system.com/webhooks/ctf"
# Returns: {"job_id": "job_abc123", "status": "queued"}
Code example: batch DOCX → PDF for contract execution
A common pattern in legal ops: a folder of executed DOCX contracts needs to be converted to PDF and saved to a document management system or S3. This uses plain requests and fetch — no SDK.
import requests
from pathlib import Path
from uuid import uuid4
CTF_API_KEY = "ctf_sk_your_key_here"
OUTPUT_DIR = Path("./executed-pdfs")
OUTPUT_DIR.mkdir(exist_ok=True)
def convert_contract_to_pdf(docx_path: Path) -> Path:
"""Convert a DOCX contract to PDF using ChangeThisFile API."""
with open(docx_path, "rb") as f:
resp = requests.post(
"https://changethisfile.com/v1/convert",
headers={
"Authorization": f"Bearer {CTF_API_KEY}",
"Idempotency-Key": f"contract-{docx_path.stem}-{uuid4()}",
},
files={"file": (docx_path.name, f)}, # source auto-detected from filename
data={"target": "pdf"},
timeout=60,
)
resp.raise_for_status()
out_path = OUTPUT_DIR / f"{docx_path.stem}.pdf"
out_path.write_bytes(resp.content)
return out_path
# Process a matter's contracts folder
contracts_dir = Path("./matter-2024-cv-1234/contracts")
for docx in sorted(contracts_dir.glob("*.docx")):
pdf = convert_contract_to_pdf(docx)
print(f"Converted: {docx.name} → {pdf.name}")
JavaScript version (Node.js, no SDK):
const fs = require('fs');
const path = require('path');
const CTF_API_KEY = process.env.CTF_API_KEY;
async function convertContractToPdf(docxPath) {
const filename = path.basename(docxPath);
const fileBuffer = fs.readFileSync(docxPath);
const form = new FormData();
form.append('file', new Blob([fileBuffer]), filename); // source auto-detected
form.append('target', 'pdf');
const resp = await fetch('https://changethisfile.com/v1/convert', {
method: 'POST',
headers: { 'Authorization': `Bearer ${CTF_API_KEY}` },
body: form,
});
if (!resp.ok) throw new Error(`Conversion failed: ${resp.status}`);
return Buffer.from(await resp.arrayBuffer());
}
// Usage
convertContractToPdf('./contracts/engagement_letter.docx')
.then(pdf => fs.writeFileSync('./executed/engagement_letter.pdf', pdf))
.catch(console.error);
curl one-liner for quick ad hoc use:
curl -sX POST https://changethisfile.com/v1/convert \
-H "Authorization: Bearer $CTF_API_KEY" \
-F "file=@settlement_agreement.docx" \
-F "target=pdf" \
-o settlement_agreement.pdf
Pricing for legal team scale
| Plan | Conversions/month | Price | Fits |
|---|---|---|---|
| Free | 1,000 | $0 | Small firm evaluating the API, occasional use |
| Hobby | 10,000 | $29/mo | Small firm with regular document needs, 1-3 active matters |
| Startup | 50,000 | $99/mo | Mid-size firm, active litigation support, or legal ops team |
| Scale | 500,000 | $499/mo | Large firm or discovery-heavy practice with bulk production needs |
| Growth | 5,000,000 | $1,999/mo | Enterprise legal ops, discovery platform, or e-filing integration |
A busy litigation matter might produce 500–2,000 documents for a production set. At $99/month, the Startup plan covers that volume several times over. If your firm has multiple active matters in production simultaneously, Scale is more appropriate.
FAQ
Does the API produce PDF/A for archival filings?
The DOCX → PDF route produces standard PDF using LibreOffice headless. For court-required PDF/A compliance, check whether the output meets your court's specific standard. PDF/A-1b compliance depends on the source document's embedded fonts. Test with your typical document templates before relying on it for filed documents.
Are uploaded files stored or logged?
Files are stored temporarily during conversion and auto-deleted after. No file content is retained. For highly sensitive matter documents, you can use the browser tool for client-side routes (images stay on-device), or confirm your firm's data handling requirements before using server-side routes.
Can I convert MSG or EML email files for eDiscovery?
MSG and EML are not currently supported conversion sources. For email-to-PDF production, you'll need a dedicated eDiscovery tool that handles email threading and metadata. ChangeThisFile is suited to document format conversions, not email export pipelines.
What about TIFF → PDF for scanned documents?
TIFF → PDF is supported. Multi-page TIFFs (common for scanned depositions or contracts) convert to multi-page PDFs. For very large scanned files, use async mode to avoid timeout issues.
Is there an audit trail of conversions?
The API returns HTTP logs and job IDs. The API itself doesn't provide a built-in audit report — if your firm needs a conversion audit trail, log the job ID and timestamp in your own system alongside the idempotency key.
Can this replace our litigation support vendor's conversion tools?
For format normalization ahead of a vendor handoff — yes, for common formats. For Bates stamping, load file generation, or OCR, you still need a dedicated litigation support tool. ChangeThisFile handles the format conversion step, not the full production workflow.
Related guides
Conversion guides relevant to legal document workflows: