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

ArchivePageCount

edited May 2005 in General
Hi,

How do I calculate the TppArchiveReader.ArchivePageCount before calling
print.

Carl H.

Comments

  • edited May 2005
    Hi Carl,

    The ArchivePageCount does not update until the file has been opened by the
    archive reader. However, it retrieves the page count from the archive file
    header information in the following manner. You can do something similar by
    putting the .raf file into a file stream...

    uses ppTypes;

    PageEntrySize := SizeOf(TppPageEntryRec);

    ArchiveStream.Seek(0, soFromBeginning);

    ArchiveStream.Read(HeaderSize, SizeOf(Longint));

    FArchivePageCount := (HeaderSize - SizeOf(Longint)) div PageEntrySize;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.