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.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


This function prepares a page for editing.

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

MBS( "DynaPDF.EditPage"; PDF; Page )


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Page The number of the page to edit. Range from 1 to DynaPDF.GetPageCount. 1


Returns OK on success.


This function prepares a page for editing.
If the page does exist (PageNum is greater than the number of pages in the document), new pages are appended until the number of pages is equal PageNum. An open page must be closed with EndPage() after the required changes are made.

See also EditPage function in DynaPDF manual.


Edit page 1:

Set Variable [$r; Value:MBS("DynaPDF.EditPage"; $pdf; 1)]

Loop over pages and add page numbers:

Set Variable [$PageCount; Value:MBS( "DynaPDF.GetPageCount"; $pdf )]
Set Variable [$PageNumber; Value:1]
Set Variable [$pageWidth; Value:MBS("DynaPDF.GetPageWidth"; $pdf)]
Set Variable [$pageHeight; Value:MBS("DynaPDF.GetPageHeight"; $pdf)]
    Set Variable [$r; Value:MBS("DynaPDF.EditPage"; $pdf; $PageNumber)]
    Set Variable [$r; Value:MBS( "DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 12)]
    Set Variable [$r; Value:MBS( "DynaPDF.WriteFTextEx"; $pdf; 50; $pageHeight - 50; $pageWidth-100; 30; "right"; GetAsText($PageNumber) & " of " & $PageCount)]
    Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]
    Set Variable [$PageNumber; Value:$PageNumber +1]
    Exit Loop If [$PageNumber > $PageCount]
End Loop

See also

Example Databases

DynaPDF.DrawPie   -   DynaPDF.EditTemplate

Feedback: Report problem or ask question.

MBS Xojo Chart Plugins