issues with IndentLeft/IndentHanging

Questions and answers on how to use DOCXReadWrite
Post Reply
DiBase
Posts: 13
Joined: Wed Feb 16, 2022 9:41 pm

issues with IndentLeft/IndentHanging

Post by DiBase »

I try to realize an individual numbered list (with individual numbers - and bigger distance between number and text.
Here is en extract of my code (in C++):

Code: Select all

  Para = DOCXEditor->Paras->AppendPara();

  Para->PAPX->IndentLeft = 50;
  Para->PAPX->IndentHanging = 50;

  Para->AppendPlainText( IntToStr( (__int64)nr ) + "." );

  Para->AddTabStops();
  Para->TabStops->Add( (double)50 );

  Para->AppendTab();
  Para->AppendFormattedText( "\\B" + Name + "\\b" );
  Para->AppendPlainText( Text );
Two questions/issues:
  1. When using IndentHanging only, the text beginning from second line is not moving to the right - only the first line is moving to the left (outside of the main text area). Only with IndentLeft I get the result I expect.
    Is this behavior intentional?
  2. The indent of irst line and rest of text block does not match in preview and pdf export. Exported as .docx it looks perfect. How can I fix the preview/pdf issue?
- Dirk
Post Reply