Document Workflow
Document Scan → Enhance → PDF
Correct a photographed document, enhance readability, then create a PDF.
document-scanner
→image-enhancer
→images-to-pdf
InputDocument image
Final resultPDF File
Tools useddocument-scanner → image-enhancer → images-to-pdf
Complete code
const scanned = await client.run("document-scanner", {
file: photoFile,
options: {
mode: "enhanced-color",
deskew: true,
format: "jpg"
}
});
const enhanced = await client.run("image-enhancer", {
file: scanned.files[0],
options: {
preset: "balanced",
auto: true,
format: "jpg",
quality: 0.92
}
});
const pdf = await client.run("images-to-pdf", {
files: [enhanced.files[0]]
});
const finalPdf = pdf.files[0];
Before adapting this recipe, use client.describe(toolId) or the Tool Reference page to verify exact file limits, option values, and supported modes.