Dear Sir,
I have a PDF that consists of multiple pages. Is it possible to display a text label only on the last page of the PDF, and nowhere else?
Thank you.
Last page of a PDF
Re: Last page of a PDF
Support · Jan 24, 2008Currently, using ReportWriter it is not possible to have an element only appear on only the last page. This is however a feature that can be achieved using the v5.0 of ReportWriter and Designer. In version 5.0 you will be able to set up templates to be applied to different parts of the report. Expect Version 5.0 to be released in the next 6 to 8 weeks.
In the current version of ReportWriter, you can place an entirely new last page on the document and you can add anything to it that you want but it is not possible to add individual elements to the actual last page of the document.
Thanks,
ceTe Software Support Team
Re: Last page of a PDF
Support · Jan 28, 2008Hello,
There is a way to add a Label or any page element to the last page of the PDF report without any problem. You can access the last page of the PDF document from the page collection using the page index. In order to do this you will have to use the DocumentLayout to generate the report. You can access the last page using the following line of code.
DocumentLayout report = new DocumentLayout(@"C:\Temp\test.dplx");
Document document = report.Run();
Page page = document.Pages[document.Pages.Count-1];
page.Elements.Add(some page element);
doc.DrawToWeb();
Thanks,
ceTe Software Support Team.
Re: Last page of a PDF
Forum member · Jan 28, 2008Dear Sir,
The name of the label I would like to appear on the last page of the report is Label3. Would Label3 replace "some page element" in the Add method below?
page.Elements.Add(some page element);
Thank you.
Re: Last page of a PDF
Support · Jan 28, 2008Hello,
Yes, you can pass the label element as a parameter in the Add method.
Label label3 = new Label("label text", x, y, width, height);
page.Elements.Add(label3);
Thanks,
ceTe Software Support Team.