You are not logged in.
Pages: 1
Thank you for the answer, rvk! I have already checked some parts of the source code but since I believed there is a way to do that and I'm missing it, I preferred not to mess with it. If there are no other possibilities I guess I'll have to try and modify some parts according to my needs. Thank you once again!
Edit: Just tried commenting the aforementioned lines and at first look it works using RawPages and SetPage.
Hello,
I'm using SynPdf and after adding a few pages and drawing some objects / text on each page canvas I would like to return to page number 1 for example and write some additional text (like page number / total pages). I cannot find any example how to do that. I'm doing something like that:
var
pdf: TPdfDocumentGDI;
page: TPdfPage;
begin
pdf := TPdfDocumentGDI.Create;
// page 1
page := pdf.AddPage;
pdf.VCLCanvas.Font.Name := 'Times New Roman';
pdf.VCLCanvas.Font.Size := 24;
pdf.VCLCanvas.TextOut(100, 100, 'some text on page 1');
// page 2
page := pdf.AddPage;
pdf.VCLCanvas.Font.Name := 'Times New Roman';
pdf.VCLCanvas.Font.Size := 24;
pdf.VCLCanvas.TextOut(100, 100, 'some text on page 2');
// write some text back to page 1
...
end;
I have tried something like this but it clears the entire page contents and obviously that's not the correct way to do it:
...
//
page := pdf.RawPages[0]; // select page 1
//
pdf.Canvas.SetPage(page); // set active canvas to page 1
...
Any help would be appreciated.
Pages: 1