Table of Contents
Fetching ...

Text-Conditioned Background Generation for Editable Multi-Layer Documents

Taewon Kang, Joseph K J, Chris Tensmeyer, Jihyung Kil, Wanrong Zhu, Ming C. Lin, Vlad I. Morariu

TL;DR

This work tackles the challenge of generating background visuals for multi-page, text-rich documents without compromising readability. It introduces a latent-masking strategy to softly attenuate diffusion updates near foreground content, plus Automated Readability Optimization to place minimal-opacity, rounded backing shapes that satisfy WCAG contrast requirements. A summarization-and-instruction pipeline with a Recursive Narrative Bank sustains cross-page thematic coherence, while a layered document representation enables targeted background editing without altering text or figures. The framework is training-free and demonstrates superior readability, design quality, and multi-page consistency compared with baselines, highlighting its practical impact for automated, design-aligned document editing workflows.

Abstract

We present a framework for document-centric background generation with multi-page editing and thematic continuity. To ensure text regions remain readable, we employ a \emph{latent masking} formulation that softly attenuates updates in the diffusion space, inspired by smooth barrier functions in physics and numerical optimization. In addition, we introduce \emph{Automated Readability Optimization (ARO)}, which automatically places semi-transparent, rounded backing shapes behind text regions. ARO determines the minimal opacity needed to satisfy perceptual contrast standards (WCAG 2.2) relative to the underlying background, ensuring readability while maintaining aesthetic harmony without human intervention. Multi-page consistency is maintained through a summarization-and-instruction process, where each page is distilled into a compact representation that recursively guides subsequent generations. This design reflects how humans build continuity by retaining prior context, ensuring that visual motifs evolve coherently across an entire document. Our method further treats a document as a structured composition in which text, figures, and backgrounds are preserved or regenerated as separate layers, allowing targeted background editing without compromising readability. Finally, user-provided prompts allow stylistic adjustments in color and texture, balancing automated consistency with flexible customization. Our training-free framework produces visually coherent, text-preserving, and thematically aligned documents, bridging generative modeling with natural design workflows.

Text-Conditioned Background Generation for Editable Multi-Layer Documents

TL;DR

This work tackles the challenge of generating background visuals for multi-page, text-rich documents without compromising readability. It introduces a latent-masking strategy to softly attenuate diffusion updates near foreground content, plus Automated Readability Optimization to place minimal-opacity, rounded backing shapes that satisfy WCAG contrast requirements. A summarization-and-instruction pipeline with a Recursive Narrative Bank sustains cross-page thematic coherence, while a layered document representation enables targeted background editing without altering text or figures. The framework is training-free and demonstrates superior readability, design quality, and multi-page consistency compared with baselines, highlighting its practical impact for automated, design-aligned document editing workflows.

Abstract

We present a framework for document-centric background generation with multi-page editing and thematic continuity. To ensure text regions remain readable, we employ a \emph{latent masking} formulation that softly attenuates updates in the diffusion space, inspired by smooth barrier functions in physics and numerical optimization. In addition, we introduce \emph{Automated Readability Optimization (ARO)}, which automatically places semi-transparent, rounded backing shapes behind text regions. ARO determines the minimal opacity needed to satisfy perceptual contrast standards (WCAG 2.2) relative to the underlying background, ensuring readability while maintaining aesthetic harmony without human intervention. Multi-page consistency is maintained through a summarization-and-instruction process, where each page is distilled into a compact representation that recursively guides subsequent generations. This design reflects how humans build continuity by retaining prior context, ensuring that visual motifs evolve coherently across an entire document. Our method further treats a document as a structured composition in which text, figures, and backgrounds are preserved or regenerated as separate layers, allowing targeted background editing without compromising readability. Finally, user-provided prompts allow stylistic adjustments in color and texture, balancing automated consistency with flexible customization. Our training-free framework produces visually coherent, text-preserving, and thematically aligned documents, bridging generative modeling with natural design workflows.

Paper Structure

This paper contains 46 sections, 17 equations, 39 figures, 2 tables.

Figures (39)

  • Figure 1: Comparison with existing diffusion methods. Baseline diffusion models overwrite or alter the original document: removing titles and figures ((1), (2)), modifying semantic content ((3),(5),(6)), and even changing resolution ((4)). In contrast, our method preserves all foreground elements (text + images), while generating visually coherent, multi-page backgrounds aligned with the document content.
  • Figure 2: Overview of our document-centric background generation framework. Given structured document pages (e.g., PDF, slides), we first perform Foreground Region Extraction to obtain page-level text $T_i$ and bounding box information $\mathcal{L}_i$, while selecting representative regions $\mathcal{B}_i$ for latent masking. The Summarization Model compresses verbose page text $T_i$ into a compact semantic label $s_i$, which is transformed into generation instructions $u_i$ by the Instruction Model with multi-page continuity enforced by the Recursive Narrative Bank (RNB). Backgrounds are then synthesized by a text-to-image diffusion model, guided by (i) Latent Masking (LM) using $\mathcal{B}_i$ to preserve foreground readability, and (ii) Automated Readability Optimization (ARO) which adaptively places semi-transparent backing shapes behind all text regions $\mathcal{L}_i$ to satisfy WCAG contrast requirements. The resulting backgrounds are composited with the document foreground, yielding coherent, readable, and visually consistent multi-page documents.
  • Figure 3: Representative qualitative comparison on academic-style PDFs (A4). Rows correspond to style conditions (Colorful, Geometric, Muted, Professional, Real & Natural, Shapes, Textures). See more results in the supplementary materials.
  • Figure 4: Representative qualitative comparison on academic-style slides (16:9). Rows correspond to style conditions (Colorful, Geometric, Muted, Professional, Real & Natural, Shapes, Textures). See more results in the supplementary materials.
  • Figure 5: Feedback-based document editing. Our system enables post-generation refinement through prompts. Users can modify only the background layer—without altering text or figures— such as reducing the number of people, adjusting colors, style and scale.
  • ...and 34 more figures