Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.GetResultAsPDF
Returns the result of the transaction as PDF.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 4.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
curl | The CURL session handle. | $curl | |
Filename | The desired file name. | test.png | Optional |
DontRenderPreview | Pass 1 to not create a JPEG with preview of first page as part of the container. | 0 | Optional |
Result
The result value which you can assign to a container field.
Description
Returns the result of the transaction as PDF.Make sure the data is a PDF. The plugin does not verify whether result is a PDF file. But if it is one, it sets size properties and creates a preview JPEG so FileMaker can preview it (Preview is Mac only).
For Windows you can generate preview with DynaPDF.GeneratePreview function.
Version 5.2 and later can use the filename from URL if you don't provide one yourself.
See also CURL.GetResultAsContainer
If you have a DynaPDF Pro license and DynaPDF functions initialized, this function can add previews for the PDF file on Windows and Linux. For MacOS, we make them with PDFKit..
Examples
Load PDF from URL and store in container:
# start new transfer
Set Variable [$curl; Value:MBS("CURL.New")]
# set URL
Set Variable [$r; Value:MBS("CURL.SetOptionURL"; $curl; "https://www.monkeybreadsoftware.com/filemaker/files/Installation.pdf")]
# run transfer
Set Variable [$ErrorCode; Value:MBS("CURL.Perform"; $curl)]
# get result as PDF and store in field:
Set Variable [$Result; Value:MBS( "CURL.GetResultAsPDF"; $curl)]
Set Field [test::MyContainerField; $Result]
# get debug messages:
Set Variable [$DebugMessages; Value:MBS( "CURL.GetDebugMessages"; $curl)]
# cleanup
Set Variable [$r; Value:MBS("CURL.Release"; $curl)]
See also
- CURL.GetDebugMessages
- CURL.GetResultAsContainer
- CURL.GetResultAsData
- CURL.GetResultAsEmail
- CURL.GetResultAsGIF
- CURL.GetResultAsMime
- CURL.GetResultAsPNG
- CURL.New
- CURL.Perform
- CURL.Release
Example Databases
Blog Entries
- Translating Insert from URL options for CURL to MBS Plugin calls
- MBS FileMaker Plugin, version 5.1pr1
- MBS Filemaker Plugin, version 4.0pr2
This function checks for a license.
Created 18th August 2014, last changed 19th April 2020