When I measure the whole thing in the finished PDF, the Rowheight = 20 and the page height 1153.
and it has 57 lines
The page height shown with AdvGridPDFIO.PageHeight queried is 842
the margins are each 40
rowheight is 18
with my calculation this results in 42 (.33333) lines
Is there another solution that provides the correct result?
I could also create the PDF two times and remember the max page. But that's not so cool.
We’ve added support for adding a pdf page count reference, that will automatically be filled in with the count. For example in demo 92 demonstrating AdvGridPDFIO, changing the code from
procedure TForm56.AdvGridPDFIO1GetFooter(Sender, AExportObject: TObject;
APageIndex: Integer; var AFooter: string);
begin
AFooter := 'Page ' + IntToStr(APageIndex + 1);
end;
to
uses
AdvPDFCoreLibBase;
procedure TForm56.AdvGridPDFIO1GetFooter(Sender, AExportObject: TObject;
APageIndex: Integer; var AFooter: string);
begin
AFooter := 'Page ' + IntToStr(APageIndex + 1) + ' of ' + PDFPageCountRef;
end;