You are not logged in.
Pages: 1
We have a generic library to print (either to printer, pdf, eml...) and use windows api DrawText to write text. If the specified rectangle width is smaller than the needed width the text is not clipped. If we use the DT_WORDBREAK format then the clipping is done.
ex: (font - Arial size 8)
fPDF := TPdfDocumentGDI.Create;
fPDF.EmbeddedTTF := True;
fPDF.DefaultPaperSize := psA4;
fPDF.PDFA1 := True;
vText := 'This is a random text!';
vRect.Left := 50;
vRect.Top := 200;
vRect.Right := 350;
vRect.Bottom := 216;
vFormat := DT_EXTERNALLEADING or DT_NOPREFIX or DT_LEFT;
DrawText(fPDF.VCLCanvas.Handle, pChar(vText), Length(vText), vRect, vFormat )
woks fine, but if i reduce the rectangle width (vRect.Right := 65;) it doesn't!
Offline
Thank you for the fast reply. My revision is '1.18.2760'.
Offline
Pages: 1