PDFKit.allowsPrinting
---------------------

Returns a Boolean value indicating whether the document allows printing.

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

MBS( "PDFKit.allowsPrinting"; PDF ) 

**MBS**( **"PDFKit.allowsPrinting";** /\* Returns a Boolean value indicating whether the document allows printing. \*/  
**$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). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| 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). |  |

### Result

Returns 1 if printing is allowed and 0 else.

### Description

Returns a Boolean value indicating whether the document allows printing.  
The ability to print a PDF document is an attribute unrelated to whether the document is locked or unlocked. It depends on the PDF permissions set by the document's author.  
This method only determines the desired permissions setting in the PDF document; it is up to the application to enforce (or ignore) the permissions.  
This method always returns 1 if the document is not encrypted. Note that in many cases an encrypted document may still be readable by all users due to the standard empty string password. For more details about user and owner passwords, see the Adobe PDF specification.  
### Examples

Shows some properties:

 # Load PDF from container   
Set Variable \[ $pdf ; Value: MBS ( "[PDFKit.OpenContainer](PDFKitOpenContainer.md)"; Popup Menu::logo ) \]   
\# Check some properties   
Set Variable \[ $allowsCopying ; Value: MBS ( "[PDFKit.allowsCopying](PDFKitallowsCopying.md)"; $PDF ) \]   
Set Variable \[ $allowsPrinting ; Value: MBS ( "PDFKit.allowsPrinting"; $PDF ) \]   
Set Variable \[ $isEncrypted ; Value: MBS ( "[PDFKit.isEncrypted](PDFKitisEncrypted.md)"; $PDF ) \]   
Set Variable \[ $isLocked ; Value: MBS ( "[PDFKit.isLocked](PDFKitisLocked.md)"; $PDF ) \]   
\# show in dialog   
Show Custom Dialog \[ "PDF Details" ; "allows copying: " &amp; If($allowsCopying ; "yes"; "no") &amp; ¶ &amp;   
"allows printing: " &amp; If($allowsPrinting ; "yes"; "no") &amp; ¶ &amp;   
"is encrypted: " &amp; If($isEncrypted ; "yes"; "no") &amp; ¶ &amp;   
"is locked: " &amp; If($isLocked ; "yes"; "no")\]   
\# release PDF   
Set Variable \[ $r ; Value: MBS ("[PDFKit.Release](PDFKitRelease.md)"; $pdf ) \]  
### See also

- [PDFKit.allowsCopying](PDFKitallowsCopying.md)
- [PDFKit.isEncrypted](PDFKitisEncrypted.md)
- [PDFKit.isLocked](PDFKitisLocked.md)
- [PDFKit.Open](PDFKitOpen.md)
- [PDFKit.OpenContainer](PDFKitOpenContainer.md)
- [PDFKit.Release](PDFKitRelease.md)

This function checks for a license.

Created 18th August 2014 , last changed 25th November 2019

  
[PDFKit.allowsCopying](PDFKitallowsCopying.md) - [PDFKit.isEncrypted](PDFKitisEncrypted.md)

[HTML Version](PDFKitallowsPrinting.shtml)