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.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

PDFKit.SetPDFPageDisplayAnnotation

Sets whether annotations are drawn.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
PDFKit 6.0 Yes No Yes, macOS only No No

MBS( "PDFKit.SetPDFPageDisplayAnnotation"; PDF; index; Value )

Parameters

Parameter Description Example value
PDF The PDF reference number. $pdf
index The index of the page. From zero to PDFKit.GetPDFPageCount-1. 1
Value The new value for whether to display annotations. Can be 0 or 1. 1

Result

Returns OK or error.

Description

Sets whether annotations are drawn.
Function to turn on or off the display of annotations when the page is drawn.

Your changes are only done in memory, so please remember to write modified pdf back to disk, e.g. by using PDFKit.WriteToPath. Or use PDFKit.GetPDFDocument to get a PDF for storing in a container.

Examples

Render with or without image:

Set Variable [$pdf; Value:MBS( "PDFKit.OpenContainer"; PDFKit Rendering::PDF )]
Set Variable [$r; Value:MBS( "PDFKit.SetPDFPageDisplayAnnotation"; $pdf; 0; 0 )]
Set Field [PDFKit Rendering::Image1; MBS( "PDFKit.GetPDFPageImage"; $pdf; 0)]
Set Variable [$r; Value:MBS( "PDFKit.SetPDFPageDisplayAnnotation"; $pdf; 0; 1 )]
Set Field [PDFKit Rendering::Image2; MBS( "PDFKit.GetPDFPageImage"; $pdf; 0)]
Set Variable [$r; Value:MBS("PDFKit.Release"; $pdf)]

See also


PDFKit.SetPDFAttribute   -   PDFKit.SetPDFPageRotation

Feedback: Report problem or ask question.




Links
MBS Xojo blog