Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

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

Hi,

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);
var
lParams: TraParamList;
begin

{add page to cache}
AddPageToCache(aPage);

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


Do you have any solution?

Yours,
Michael Schustereder

Comments

  • 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
    http://www.digital-metaphors.com
  • Hi Nico,

    thanks for your prompt reply. OnReadPage works :-)

    Yours, Michael
Sign In or Register to comment.