You are not logged in.
Pages: 1
Hi,
when system default printer paper size is smaller than A4 (letter or A5 for example)
and richedit component contains underlined characters these underscores are not rendered at bottom of page
except underscores all page contents looks correct (including page footer)
thanks
code:
uses mORMotReport,synpdf;
procedure SaveToPdf(rtHandle:HWnd; SFile:string);
begin
with TGDIPages.Create(self) do
begin
Caption := 'Report';
NewPageLayout(TGdiPagePaperSize(psA4));
BeginDoc;
SaveLayout;
AddTextToHeader('Header');
AddPagesToFooterAt('%d / %d',RightMarginPos);
RestoreSavedLayout;
DrawTitle('begin',false);
AppendRichEdit(rtHandle);
EndDoc;
ExportPDF(sFile,true,false);
end;
end;
Offline
Hi Ratay,
I think I had a similar problem with underlined text in RichEdit,
I found that the underline was produced with a new EMR_BITBLT metafile record and maybe the coordinates for this emulated line falls out of the RichEdit
I had already changed my EMR_BITBLT for a similar reason
{$IFDEF TMW_TEST_NEW_GDI}
E.FillRectangle(Rect(xDest - 1, yDest - 1, xDest + cxDest, yDest + cyDest), true);
{$ELSE}
E.FillRectangle(Rect(xDest, yDest, xDest + cxDest, yDest + cyDest), true);
{$ENDIF}
If you have sources of your report engine, you can take a look also at the AutoSize procedure for RichEdit, maybe a simple +1 in CalcHeight will fix
Last edited by MtwStark (2019-11-20 14:53:48)
Offline
Pages: 1