.. highlightlang:: us .. index:: updf_get_free_pages .. _updf_get_free_pages: updf_get_free_pages =================== .. us.tag updf_get_free_pages NOTREADYENGLISH updf updf-stor New5500 :ref:`updf_get_free_pages` returns the number of unused pages in a UPDF file. .. function:: nPages = updf_get_free_pages(stg) .. us.return **Return Value** *nPages* number of unused pages. .. us.params **Parameters** .. uparam:: stg *stg* is a storage object (see :ref:`updf_create_file`, :ref:`updf_open_file`, :ref:`updf_create_storage`). .. us.comment **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 :ref:`updf_copy_to`. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013 (5.50) - New. .. seealso:: :ref:`Overview-UPDF-Files`, :ref:`updf_create_file`, :ref:`updf_open_file` :sub:`id-1760231`