Unplanned
Last Updated: 03 Dec 2026 12:59 by Greg
Greg
Created on: 03 Dec 2026 12:59
Category: WordsProcessing
Type: Bug Report
1
WordsProcessing: PdfFormatProvider: ArgumentException is thrown during PDF export of a document with justified paragraphs whose spacing adjustments exceed the first glyph's width

ArgumentException is thrown during PDF export of a document with justified paragraphs whose spacing adjustments exceed the first glyph's width.

Workaround: Change affected paragraphs from justified to left-aligned before PDF export. This avoids generating justification adjustments that trigger the exception:

foreach (Paragraph paragraph in doc.EnumerateChildrenOfType<Paragraph>())
{
    if (paragraph.TextAlignment == Alignment.Justified)
    {
        paragraph.TextAlignment = Alignment.Left;
    }
}

 

 

0 comments