Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  


The function writes the pages in memory to the PDF file.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 3.3 Yes Yes Yes Yes Yes

MBS( "DynaPDF.FlushPages"; PDF; Flags )


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Flags A combination of the flag values. Default is 0. 0


Returns OK or error message.


The function writes the pages in memory to the PDF file.
The function can be called every time a new page was created or whenever the pages in memory are no longer required.
Calling the function on a memory based PDF file is not meaningful. The output file must already be open before the function can be called. If no output file was set in DynaPDF.New then open the output file with DynaPDF.OpenOutputFile beforehand.
Flushed pages can no longer be accessed with DynaPDF.EditPage but it is of course possible to add further pages to the file.
By default, the function writes the content streams of all pages and referenced templates, patterns, and images to the output file. The content streams of these objects will be released but the objects remain in memory. So, all handles remain valid and it is still possible to use already flushed objects in subsequent pages. For example, a flushed image or template can still be inserted in other pages with DynaPDF.PlaceImage or DynaPDF.PlaceTemplate because the content streams or image buffers are not required for this action.
The flag ImagesOnly can be used to flush the images in memory only. This can be useful if further objects must be added to the pages in memory or if a large image was inserted.
It is allowed to call the function within an open page. In this case the function does not flush the content stream of the current open page but anything else depending on the used flags.
Calling a function like DynaPDF.DeletePage, DynaPDF.DeleteField or any other function that deletes a flushed object results in a damaged PDF file.

Default0Write anything to the file that is possible
ImagesOnly1 If set, only images are written to the PDF file. All pages are still kept in memory and can be modified with DynaPDF.EditPage. Flushed images can still be referenced in other pages. The image handles remain valid.
ExclLastPage2If set, the last page is not flushed

See also FlushPages function in DynaPDF manual.


Do a flush:

MBS( "DynaPDF.FlushPages" )

See also

Example Databases

DynaPDF.FlattenForm   -   DynaPDF.FontInfo

Feedback: Report problem or ask question.

MBS FileMaker Plugins