# Bulk test-document generator and Stitch-to-PDF storyboard

> Generate any number of labelled placeholder PDFs and images for upload testing, and combine exported UI screens into one searchable storyboard PDF.

URL: https://thuyavan.netlify.app/projects/bulk-document-generator
Updated: 2026-10-12

- Period: 2025-10 → 2025-12
- Technologies: Python, PDF & document generation

## Members

Part
Path
Lines
Output

S09a Word→PDF
internal path
147
numbered .docx rendered to .pdf

S09b Pillow images
…/python_image_canva.py
164
numbered .png / .jpg canvases

older
…/ex/python_pdf_generator.py
152
earlier single-purpose version

S09c Stitch→PDF storyboard
process_files.py + image_board.py (design doc + portfolio page)
—
one large labelled PDF board of many UI screens

Dates 2025-10-20 (a/b), 2025-12-18 ©. Portfolio pages: bulk-test-document-generator (2025-10-20), stitch-to-pdf-storyboard (2025-12-18). Owner.

## S09a / S09b — bulk placeholder documents

Purpose (portfolio): create numbered placeholder documents for QA / upload-testing of forms and pipelines.

S09a python_word_to_pdf
S09b python_image_canva

Builds
a Word doc per item (python-docx: heading, date / time with labels, an icon image at a set height), then converts to PDF
a canvas per item (PIL Image/ImageDraw/ImageFont: heading, date / time, centred icon)

PDF route
comtypes.client drives Word to export PDF (Windows)
—

Params
base_name, count, image_folder, output_dir, font sizes, image height, image_start_index (1-based, circular reuse of icons)
+ output_formats=("png","jpg"), canvas_width/height

Logging
logging module
logging

Both are parameterised functions with sensible defaults — set a name, a count and an icon folder, run. Likely used to generate the dummy passport / document sets for testing the VisaAgent upload flow (P11).

## S09c — Google Stitch → PDF storyboard

A two-stage pipeline (documented in portfolio/.../1-Stitch-to-Storyboard pdf pipeline):

process_files.py (“data engineer”): scans a folder of Stitch ZIP exports, regex-sorts them numerically (so “(2)” precedes “(10)”), extracts screen.png + code.html, renames to {index}_{name}_screen.png.

image_board.py (“layout designer”): lays screens into ordinal row-blocks on one PDF at original resolution (“infinite canvas”), with cleaned human-readable labels as selectable text, and writes an image_order.txt manifest.
Libraries: PIL, ReportLab, pathlib, re. Output: image_board_final.pdf. Solves sharing 100+ Stitch UI screens as one searchable board (used for the owner’s design handoffs; Stitch also appears in the Munz “stitch-design-taste” skill).
