WinPDF.LoadContainer
--------------------

Loads a PDF document from data in container.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WinPDF](component_WinPDF.md) | [13.2](newinversion132.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "WinPDF.LoadContainer"; ContainerValue { ; Password } ) 

**MBS**( **"WinPDF.LoadContainer";** /\* Loads a PDF document from data in container. \*/  
**$ContainerValue**; /\* The container value (variable or field) to read the PDF from.e.g. MyTable::MyPDFContainer \*/   
**$Password**) /\* Optional; The password to open the Portable Document Format (PDF) document, if it requires one. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ContainerValue | The container value (variable or field) to read the PDF from. | MyTable::MyPDFContainer |  |
| Password | The password to open the Portable Document Format (PDF) document, if it requires one. |  | Optional |

### Result

Returns reference number or error.

### Description

Loads a PDF document from data in container.  
Requires Windows 10 or newer.  
  
If the Portable Document Format (PDF) document does not require a password, this method ignores it.  
This method reports an ERROR\_WRONG\_PASSWORD (1323) error if the wrong password is specified.  
### Examples

Make preview of page:

 Set Variable \[ $pdf ; Value: MBS ( "WinPDF.LoadContainer"; Get Preview::Input ) \]   
If \[ MBS ("IsError") = 0 \]   
 Set Variable \[ $NewImage ; Value: MBS ( "[WinPDF.PageImageAtSize](WinPDFPageImageAtSize.md)"; $pdf ; 0; 0; 600; "JPEG"; "page.jpg") \]   
 If \[ MBS ("IsError") = 0 \]   
 Set Field \[ Get Preview::Preview ; $NewImage \]   
 Set Field \[ Get Preview::Made using ; "WinPDF" \]   
 Set Variable \[ $r ; Value: MBS ( "[WinPDF.Release](WinPDFRelease.md)"; $pdf ) \]   
 Exit Script \[ Text Result: \]   
 End If  
 Set Variable \[ $r ; Value: MBS ( "[WinPDF.Release](WinPDFRelease.md)"; $pdf ) \]   
End If  
### See also

- [IsError](IsError.md)
- [PDFKit.GetPDFPageImage](PDFKitGetPDFPageImage.md)
- [WinPDF.PageImage](WinPDFPageImage.md)
- [WinPDF.PageImageAtSize](WinPDFPageImageAtSize.md)
- [WinPDF.Release](WinPDFRelease.md)

### Example Databases

- [Barcode/Barcodes from Invoices](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Barcode/Barcodes%20from%20Invoices.shtml#1ScriptAnchor_)
- [Containers/Create Container Preview](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Containers/Create%20Container%20Preview.shtml#1ScriptAnchor_)
- [Win Only/WinPDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/WinPDF.shtml#2ScriptAnchor_)

### Blog Entries

- [New in MBS FileMaker Plugin 13.2](https://www.mbsplugins.de/archive/2023-05-17/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Windows PDF Functions](https://www.mbsplugins.de/archive/2023-04-11/Windows_PDF_Functions/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 8th March 2023 , last changed 15th April 2023

  
[WinPDF.List](WinPDFList.md) - [WinPDF.LoadFile](WinPDFLoadFile.md)

[HTML Version](WinPDFLoadContainer.shtml)