updf_get_free_pagesΒΆ

updf_get_free_pages returns the number of unused pages in a UPDF file.

nPages = updf_get_free_pages(stg)

Return Value

nPages number of unused pages.

Parameters

stg

stg is a storage object (see updf_create_file, updf_open_file, updf_create_storage).

Comment

A UPDF file consists of pages with a size 1024 bytes each. If pages are deleted the pages are set to empty and can be used again. If the file was created with the UPDF_REPACKING flag the free pages will be removed when the document will be closed. The packing process leads to performance loss if a large number of free pages exist. In this case it mach faster to copy the storages and streams into a new file using updf_copy_to.

History

Version Description
R2013 (5.50) New.

id-1760231