PDFKit.GetPDFPagePDF
--------------------

Creates a new PDF Document with the given PDF page.

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

MBS( "PDFKit.GetPDFPagePDF"; PDF; Index { ; FileName; DontRenderPreview } ) 

**MBS**( **"PDFKit.GetPDFPagePDF";** /\* Creates a new PDF Document with the given PDF page. \*/  
**$PDF**; /\* 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). \*/   
**$Index**; /\* The index of the page. From zero to [PDFKit.GetPDFPageCount](PDFKitGetPDFPageCount.md)-1.e.g. 1 \*/   
**$FileName**; /\* Optional; Optionally, the file name to use for the container value.e.g. "output.pdf" \*/   
**$DontRenderPreview**) /\* Optional; Pass 1 to not create a JPEG with preview of first page as part of the container.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | 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). |  |  |
| Index | The index of the page. From zero to [PDFKit.GetPDFPageCount](PDFKitGetPDFPageCount.md)-1. | 1 |  |
| FileName | Optionally, the file name to use for the container value. | "output.pdf" | Optional |
| DontRenderPreview | Pass 1 to not create a JPEG with preview of first page as part of the container. | 0 | Optional |

### Result

Returns a container with a PDF document. The plugin adds a JPEG picture for preview as well as a file name. You can store it in a media field.

### Description

Creates a new PDF Document with the given PDF page.   
Filename is optional.  
  
See [Plugin.SetPreviewSize](PluginSetPreviewSize.md) to control size of preview picture.  
If you need more options, please check [DynaPDF](component_DynaPDF.md) functions.  
Seems like this function doesn't extract annotations on the page.  
### Examples

Extract page 6 into a new PDF:

 MBS ( "PDFKit.GetPDFPagePDF"; $ref ; 5; "newpdf.pdf" )  
### See also

- [PDFKit.GetPDFPageCount](PDFKitGetPDFPageCount.md)
- [PDFKit.GetPDFPageImage](PDFKitGetPDFPageImage.md)
- [PDFKit.GetPDFPagePDFRef](PDFKitGetPDFPagePDFRef.md)
- [PDFKit.GetPDFPagesPDF](PDFKitGetPDFPagesPDF.md)
- [PDFKit.GetPDFPagesPDFRef](PDFKitGetPDFPagesPDFRef.md)
- [PDFKit.GetPDFPageText](PDFKitGetPDFPageText.md)
- [PDFKit.GetPDFPageValue](PDFKitGetPDFPageValue.md)
- [PDFKit.Open](PDFKitOpen.md)
- [PDFKit.SetCurrentFilter](PDFKitSetCurrentFilter.md)
- [Plugin.SetPreviewSize](PluginSetPreviewSize.md)

### Example Databases

- [Mac and iOS/PDFKit/Combine PDFs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/Combine%20PDFs.shtml#1Button297.0000000270.0000000326.0000000522.0000000LayoutObjectAnchor_)
- [Mac and iOS/PDFKit/PDFKit Page Selector](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/PDFKit%20Page%20Selector.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 5.1pr1](https://www.mbsplugins.de/archive/2015-03-16/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)
- [Compressing PDFs with PDFKit in FileMaker](https://www.mbsplugins.de/archive/2014-08-20/Compressing_PDFs_with_PDFKit_i/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.2pr4](https://www.mbsplugins.de/archive/2010-11-15/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2026, Seite 29 bis 30](https://filemaker-magazin.de/neuigkeit/4312-Die-neue-Ausgabe-FMM_202601-steht-online)

This function is free to use.

Created 18th August 2014 , last changed 12nd August 2022

  
[PDFKit.GetPDFPageImage](PDFKitGetPDFPageImage.md) - [PDFKit.GetPDFPagePDFRef](PDFKitGetPDFPagePDFRef.md)

[HTML Version](PDFKitGetPDFPagePDF.shtml)