#1 2021-07-26 13:22:37

Dimon_II
Member
Registered: 2021-07-26
Posts: 2

How to force word breaks on one line?

I made invisible text under the picture (with the rendered text in the SVG picture). The text is for search only, do not edit.
Due to the peculiarities of matrix formatting, I write to PDF one word at a time. But when selecting text in PDF, part of words merge. Adding a space to the end each word did not help.
Is there some way to do forced word breaks on one line?

   aPdf.Canvas.BeginText;
  while nod.Next <> nil do 
  begin
     nod := nod.Next;
     with aPdf.Canvas do
     begin
        M := NodeTrans(nod);
        SetFont(nod.Attribute['font-family'],
           StrToIntDef(nod.Attribute['font-size'],8) ,[]);
        SetTextMatrix(M.A[0, 0], M.A[0, 1], M.A[1, 0], M.A[1, 1], M.A[2, 0], Box.Height - M.A[2, 1]);
        ShowText(nod.text+' ');
     end;
  end;
  aPdf.Canvas.EndText;

PS And the rotated transform matrix works differently from SVG...

Offline

Board footer

Powered by FluxBB