Archive - "How To…Add a Drawcommand to a Page"


I use RB 18.03 with Delphi 10.2

I want to print an archive to a TppPDFDevice with an additional Text. To do this, I set the Publisher.CachePages to True. The problem is, that the Publisher add the page to the cache before the OnPageReceive is called.

procedure TppPublisher.ReceivePage(aPage: TppPage);
lParams: TraParamList;

{add page to cache}

{send page to all devices}
TakeDeviceAction(ppdvReceivePage, aPage, '');

Do you have any solution?

Michael Schustereder


  • Hi Michael,

    When using the ArchiveReader, you will want to use the OnReadPage event to add drawcommands rather than the OnReceivePage of the device. This event was designed specifically for the purpose of adding drawcommands to archived report pages.

    See the help topic for TppArchiveReader.OnReadPage for more information.

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • Hi Nico,

    thanks for your prompt reply. OnReadPage works :-)

    Yours, Michael
Sign In or Register to comment.