PDFKit.CombineRef
-----------------

Creates a new PDF document with all the given PDF files/references and returns the new PDF reference.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [PDFKit](component_PDFKit.md) | [2.3](newinversion23.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "PDFKit.CombineRef"; Name; PDFs... ) 

**MBS**( **"PDFKit.CombineRef";** /\* Creates a new PDF document with all the given PDF files/references and returns the new PDF reference. \*/  
**$Name**; /\* A text with the file name to include with the PDF.e.g. "test.pdf" \*/   
**$PDFs...**) /\* Several PDF references.   
A container value with the PDF content from a media field. Or a text with an URL. Or a PDF reference from [PDFKit.Open](PDFKitOpen.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Name | A text with the file name to include with the PDF. | "test.pdf" |
| PDFs... | Several PDF references.    A container value with the PDF content from a media field. Or a text with an URL. Or a PDF reference from [PDFKit.Open](PDFKitOpen.md). |  |

### Result

Returns the PDF reference.

### Description

Creates a new PDF document with all the given PDF files/references and returns the new PDF reference.   
You can pass container values, URLs or PDF references. You can pass one PDF reference to save to a new PDF.   
Please note the difference between [PDFKit.Combine](PDFKitCombine.md) and PDFKit.CombineRef. Combine returns a new container value with the new PDF. CombineRef returns the new PDF reference for further processing.  
If on combining one of the PDF parameters is not a valid PDF, the function returns an error. You can use [PDFKit.SetIgnoreCombineErrors](PDFKitSetIgnoreCombineErrors.md) to disable that and ignore all PDFs which fail to open. For example if you write code which takes 4 container values and not all of them contain PDF files.  
  
Starting with version 6.0, the PDFs parameters can also be lists of paths or reference numbers.  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat PDFs parameter as often as you need.  
### Examples

Combine the PDF files in the three PDF references into a new PDF reference:

 MBS ("PDFKit.CombineRef"; ""; $ref1 ; $ref2 ; $ref3 )  
### See also

- [PDFKit.Combine](PDFKitCombine.md)
- [PDFKit.Open](PDFKitOpen.md)
- [PDFKit.SetIgnoreCombineErrors](PDFKitSetIgnoreCombineErrors.md)

### Blog Entries

- [MBS FileMaker Plugin, version 5.5pr1](https://www.mbsplugins.de/archive/2015-12-09/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2026, Seite 30](https://filemaker-magazin.de/neuigkeit/4312-Die-neue-Ausgabe-FMM_202601-steht-online)
- [Ausgabe 6/2017, Seite 26](https://filemaker-magazin.de/neuigkeit/3967-Appetithappen-FMM_201706)

This function is free to use.

Created 18th August 2014 , last changed 5th June 2021

  
[PDFKit.Combine](PDFKitCombine.md) - [PDFKit.GeneratePreview](PDFKitGeneratePreview.md)

[HTML Version](PDFKitCombineRef.shtml)