AdvPDFLib and blank line

Hi

Using AdvPDFLib, I use de DrawText function like this, in ordre to add empty line above and below :


                       Chaine := Trim(Doc_Erreur[i].Valeur);
                        IF Doc_Erreur[i].Avant THEN
                           Chaine := sLineBreak + Chaine;
                        IF Doc_Erreur[i].Apres THEN
                           Chaine := Chaine + sLineBreak;
                        Cadre := Pdf.Graphics.DrawText(
                             Chaine,
                              RectF(Marge, Cadre.Bottom, pdf.PageWidth - Marge, Cadre.Bottom + 150));

However, in the final pdf, these empty lines didn't appear ?
The sLineBreak function is not taking into account ?

regards
olivier

Hi,

The TAdvPDFLib is manually calculating wordwrapping and is currently only allowing one line break for the normal DrawText call. If you want multiple linebreaks, you can use the DrawHTMLText call, with the following code:

Cadre := Pdf.Graphics.DrawHTMLText(
                             Chaine,
                              RectF(Marge, Cadre.Bottom, pdf.PageWidth - Marge, Cadre.Bottom + 150));

Hi

Thanks a lot for your answer

Regards

Télécharger TypeApp pour Android