Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.SaveAndSignFileWinCryptDialog

Saves and signs the current PDF.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 10.1 ❌ No ✅ Yes ❌ No ❌ No ❌ No
MBS( "DynaPDF.SaveAndSignFileWinCryptDialog"; PDF { ; StoreName; ContactInfo; Location; Reason; filename; Preview; DetachedSignature; CertificateName } )   More

Parameters

Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
StoreName The name of the certificate store. Optional
ContactInfo Optional contact info. Optional
Location Optional signers location string $location Optional
Reason Optional reason string. $reason Optional
filename Optionally the file name to be associated with the container value.
The file name should include pdf file extension.
"hello.pdf" Optional
Preview Optional, whether to include a preview JPEG.
Default is 1 for including one. Pass zero to disable preview.
1 Optional
DetachedSignature Available in MBS FileMaker Plugin 11.2 or newer.
Whether to use a detached signature.
Pass 1 for detached signature vs. 0 for SHA1 signature.
Default is 0.
0 Optional
CertificateName Available in MBS FileMaker Plugin 14.2 or newer.
The name of the certificate to find.
If set, we skip the dialog and look for the given certificate (subject name).
Optional

Result

Returns OK or error.

Description

Saves and signs the current PDF.
On success you either get back the PDF as container value (in memory PDF) or it returns OK after writing PDF to file (file based PDF).
The plugin also renders a JPEG for preview and includes it within the container value (with DynaPDF Pro).

On Windows you can use WinCrypt with DynaPDF.SaveAndSignFileWinCrypt function and optionally use dialog to pick the certificate with DynaPDF.SaveAndSignFileWinCryptDialog from the certificate store.
Use DynaPDF.SaveAndSignFile for cross platform signing.

See Plugin.SetPreviewSize to control size of preview picture.

Examples

Save and sign a PDF after you assembled it:

Set Variable [ $PDFData ; Value: MBS("DynaPDF.SaveAndSignFileWinCryptDialog"; $pdf; ""; "MY") ]
Set Variable [ $r ; Value: MBS("DynaPDF.Release"; $pdf) ]
# Put in Container
Set Field [ Create Text::PDF ; $PDFData ]

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 31st January 2020, last changed 19th March 2024


DynaPDF.SaveAndSignFileWinCrypt - DynaPDF.SaveGraphicState