Skip to content

Feature: Paragraph borders #2074

@caio-pizzol

Description

@caio-pizzol

Summary

Render paragraph borders (w:pBdr) across all OOXML containers, respecting the full style cascade.

Problem

Paragraph borders do not render in SuperDoc. Documents with bordered paragraphs (e.g., callout boxes, highlighted sections) lose their visual formatting.

Repro

  1. Open attached docx files in SuperDoc.
  2. Paragraphs with borders render without any visible borders.

Expected

Paragraph borders render with correct styles, colors, and widths across all containers (body, tables, headers/footers, textboxes, SDTs), matching

Word's behavior.

Notes

The OOXML element is w:pPr/w:pBdr with child elements for each side (w:top, w:bottom, w:left, w:right, w:between). Each border has w:val (style), w:sz (width), and w:color attributes. The implementation touches the converter (parsing), style-engine (cascade resolution), and DomPainter (rendering). See OOXML spec §17.3.1.24.

Four sample documents are attached covering different border styles and widths.

Attachments

paragraph_borders_all_styles_0.5pt_TOP_ONLY.docx

paragraph_borders_2pt_single_colors.docx

paragraph_borders_all_styles_0.5pt.docx

paragraph_borders_all_styles_2pt.docx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions