Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

WinPDF.Release

Releases an object reference.

Component Version macOS Windows Linux Server iOS SDK
WinPDF 13.2 ❌ No ✅ Yes ❌ No ✅ Yes, on Windows ❌ No
MBS( "WinPDF.Release"; PDFRef )   More

Parameters

Parameter Description Example
PDFRef The reference number for the PDF document. $PDF

Result

Returns OK or error.

Description

Releases an object reference.
Please call that for all PDF objects to release memory.

Examples

Query page count from a PDF:

Set Variable [ $pdf; Value:MBS( "WinPDF.LoadContainer"; WinPDF::InputPDF; WinPDF::Password ) ]
If [ MBS("IsError") ]
    Show Custom Dialog [ Title: "Failed to open PDF."; Message: $pdf; Default Button: “OK”, Commit: “Yes” ]
    Exit Script [ ]
End If
# query page count
Set Variable [ $count; Value:MBS( "WinPDF.PageCount"; $pdf) ]
Set Field [ WinPDF::PageCount; $count ]
# cleanup
Set Variable [ $r; Value:MBS( "WinPDF.Release"; $pdf) ]

See also

Example Databases

Blog Entries

This function is free to use.

Created 8th March 2023, last changed 27th August 2023


WinPDF.PageWidth - WinPDF.ReleaseAll

💬 Ask a question or report a problem