DynaPDF.AppendImagePages
------------------------

Adds new pages to the PDF with given image paths.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [6.3](newinversion63.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.AppendImagePages"; PDF; Image Paths { ; Resolution } ) 

**MBS**( **"DynaPDF.AppendImagePages";** /\* Adds new pages to the PDF with given image paths. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Image Paths**; /\* The list of native file paths.e.g. "/Users/cs/Desktop/test.jpg" \*/   
**$Resolution**) /\* Optional; The resolution to use.  
Normally we use the ones in the images, but you can overwrite it here.e.g. 300 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| Image Paths | The list of native file paths. | "/Users/cs/Desktop/test.jpg" |  |
| Resolution | The resolution to use.   Normally we use the ones in the images, but you can overwrite it here. | 300 | Optional |

### Result

Returns number or error.

### Description

Adds new pages to the PDF with given image paths.  
This is a convenience function. It creates pages ([DynaPDF.AppendPage](DynaPDFAppendPage.md)), reads image format ([DynaPDF.ReadImageFormat](DynaPDFReadImageFormat.md)) and resolution ([DynaPDF.ReadImageResolution](DynaPDFReadImageResolution.md)) and places image on page ([DynaPDF.InsertImageFile](DynaPDFInsertImageFile.md)).  
Returns number of images added. Because TIFF files can include several images, this count may be higher than the number of file paths.  
  
Added PDF support for version 12.4, so you can pass PDF documents here, too.  
  
If you have an open page, we close it automatically for you before doing the import.  
### Examples

Adds three picture pages:

 Set Variable \[$r ; Value:MBS ( "DynaPDF.AppendImagePages"; $pdf ; "/Users/cs/Desktop/Auto2.JPG¶/Users/cs/Desktop/Auto4.JPG¶/Users/cs/Desktop/Auto1.JPG" )\]  
Create PDF with images:

 Set Variable \[$pdf ; Value:MBS ("[DynaPDF.New](DynaPDFNew.md)")\]  
\# Set destination path   
Set Variable \[$r ; Value:MBS ( "[DynaPDF.OpenOutputFile](DynaPDFOpenOutputFile.md)"; $pdf ; "/Users/cs/Desktop/test.pdf")\]  
\# Add pages   
Set Variable \[$r ; Value:MBS ( "DynaPDF.AppendImagePages"; $pdf ; "/Users/cs/Desktop/Auto2.JPG¶/Users/cs/Desktop/Auto4.JPG¶/Users/cs/Desktop/Auto1.JPG"; 300 )\]  
\# Save   
Set Variable \[$PDFData ; Value:MBS ("[DynaPDF.Save](DynaPDFSave.md)"; $pdf ; "hello.pdf")\]  
\# Cleanup   
Set Variable \[$r ; Value:MBS ("[DynaPDF.Release](DynaPDFRelease.md)"; $pdf )\]  
### See also

- [DynaPDF.AppendImagePage](DynaPDFAppendImagePage.md)
- [DynaPDF.AppendPage](DynaPDFAppendPage.md)
- [DynaPDF.InsertImage](DynaPDFInsertImage.md)
- [DynaPDF.InsertImageFile](DynaPDFInsertImageFile.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.OpenOutputFile](DynaPDFOpenOutputFile.md)
- [DynaPDF.ReadImageFormat](DynaPDFReadImageFormat.md)
- [DynaPDF.ReadImageResolution](DynaPDFReadImageResolution.md)
- [DynaPDF.Release](DynaPDFRelease.md)
- [WIA.Images](WIAImages.md)

### Release notes

- **Version 12.4**
    - Improved [DynaPDF.AppendImagePage](https://www.mbsplugins.eu/DynaPDFAppendImagePage.shtml) and [DynaPDF.AppendImagePages](https://www.mbsplugins.eu/DynaPDFAppendImagePages.shtml) to handle PDF, too.
- **Version 9.1**
    - Fixed bug with image indexes for [DynaPDF.AppendImagePages](http://www.mbsplugins.eu/DynaPDFAppendImagePages.shtml) function.

### Example Databases

- [DynaPDF/Scan with WIA to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Scan%20with%20WIA%20to%20PDF.shtml#24ScriptAnchor_)

### Blog Entries

- [GraphicsMagick in FileMaker, part 9](https://www.mbsplugins.de/archive/2022-12-09/GraphicsMagick_in_FileMaker_pa/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.4pr3](https://www.mbsplugins.de/archive/2022-08-24/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Things you can do with DynaPDF](https://www.mbsplugins.de/archive/2021-07-02/Things_you_can_do_with_DynaPDF/monkeybreadsoftware_blog_filemaker)
- [Create PDF from scanned images and skip blank pages](https://www.mbsplugins.de/archive/2019-03-13/Create_PDF_from_scanned_images/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.1pr5](https://www.mbsplugins.de/archive/2019-03-01/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 6.3 for OS X/Windows](https://www.mbsplugins.de/archive/2016-07-12/MBS_FileMaker_Plugin_63_for_OS/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.3pr5](https://www.mbsplugins.de/archive/2016-07-04/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 27th June 2016 , last changed 25th September 2024

  
[DynaPDF.AppendImagePage](DynaPDFAppendImagePage.md) - [DynaPDF.AppendPage](DynaPDFAppendPage.md)

[HTML Version](DynaPDFAppendImagePages.shtml)