DynaPDF.GetUsesTransparency
---------------------------

Checks whether a page or the entire document uses transparency.

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

MBS( "DynaPDF.GetUsesTransparency"; PDF; PageIndex ) 

**MBS**( **"DynaPDF.GetUsesTransparency";** /\* Checks whether a page or the entire document uses transparency. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$PageIndex**) /\* The page index in range from 1 to [DynaPDF.GetPageCount](DynaPDFGetPageCount.md).e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| PageIndex | The page index in range from 1 to [DynaPDF.GetPageCount](DynaPDFGetPageCount.md). | 1 |

### Result

Returns 1, 0 or error.

### Description

Checks whether a page or the entire document uses transparency.   
This is no quick check as [DynaPDF.GetDocUsesTransparency](DynaPDFGetDocUsesTransparency.md) applies. The function parses the page or pages to determine whether transparent objects are really used.   
To check whether a specific page uses transparency set the parameter PageNum to the wished page number. The first page is denoted by 1. To check the entire PDF file set PageNum to -1.   
  
The return value is a bit mask on success (a positive integer value), or a error message on failure.   
The following flags are defined:   
0: The page or document uses no transparency. 1: The content stream of a page contains transparent objects. 2: A page defines the blending color space (Group dictionary). 4: A page contains transparent annotations or form fields. The above values can occur in any combination. To check whether a specific flag was set use a binary and operator, e.g. [Math.BitwiseAND](MathBitwiseAND.md). e.g. Value 6 means both 2 and 4 flags are set.  
See also [GetUsesTransparency](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetUsesTransparency.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetDocUsesTransparency](DynaPDFGetDocUsesTransparency.md)
- [DynaPDF.GetPageCount](DynaPDFGetPageCount.md)
- [DynaPDF.GetUseTransparency](DynaPDFGetUseTransparency.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetUseTransparency](DynaPDFSetUseTransparency.md)
- [Math.BitwiseAND](MathBitwiseAND.md)

### Release notes

- **Version 8.2**
    - Added [DynaPDF.SetPageBBox](http://www.mbsplugins.eu/DynaPDFSetPageBBox.shtml) and [DynaPDF.GetUsesTransparency](http://www.mbsplugins.eu/DynaPDFGetUsesTransparency.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 8.2pr6](https://www.mbsplugins.de/archive/2018-05-07/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 4th May 2018 , last changed 9th November 2021

  
[DynaPDF.GetUserUnit](DynaPDFGetUserUnit.md) - [DynaPDF.GetViewerPreferences](DynaPDFGetViewerPreferences.md)

[HTML Version](DynaPDFGetUsesTransparency.shtml)