The TRVRuler component add a left and right margin for my document - which means that I need to set the TRVPrint margin to 0 (since TRVRuler handles the margin).
But my headers and footers have a left margin of 0 even thought it is set differently with at TRVRuler for the header.
Why doesn't TRVPrint use the header specified by my TRVRuler on the header, when it does so on the body?
my print code:
Code: Select all
RVPrint.AssignSource(rvBody);
if not IsEmpty(rvHeader) then
RVPrint.SetHeader(rvHeader.RVData)
else
RVPrint.SetHeader(nil);
if not IsEmpty(rvFooter) then
RVPrint.SetFooter(rvFooter.RVData)
else
RVPrint.SetFooter(nil);
RVPrint.LeftMarginMM := 0;
RVPrint.RightMarginMM := 0;
RVPrint.TopMarginMM := Round(RVRulerBody.TopMargin * 10);
RVPrint.BottomMarginMM := Round(RVRulerBody.BottomMargin * 10);
RVPrint.FormatPages(rvdoALL);
if (RVPrint.PagesCount > 0) then
RVPrint.Print(edtSkabelonType.Text + edtSkabelonNavn.Text, 1, False);