Hi Frédéric,
> GetLineHeight() returs 0, why?
> Is it because I have not yet written anything?
Right. wxPdfDocument tries to derive a line height from the first text
output (and keeps track of the last line height used). However, you can
always override the line height to suit your needs.
> How can I get the height of a text?
The text height is implicitly given by the font size. Before you start
to output text to PDF you have to select a font and to set a font size
in points.
For the line height you should always add some extra space, so that the
text stays readable. Using something like
SetLineHeight(GetFontSize()*1.25 / GetScaleFactor());
is usually a good compromise (that is, 25% more than the font size).
> I found GetStringWidth(s) to get
> the width of a written text but I do not know how to get the height.
As said above the text height is given by the font size. The text height
(font size) doesn't vary, while the text width depends on the actual
characters in the text when using a variable spaced font.
Regards,
Ulrich