Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
PDFKit.allowsCopying
Returns a Boolean value indicating whether the document allows copying of content to the Pasteboard.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| PDFKit | 2.9 | Yes | No | No | Yes, macOS only | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| A container value with the PDF content from a media field. Or a text with an URL. Or a PDF reference from PDFKit.Open. |
Result
Returns 1 if copying is allowed and 0 else.
Description
Returns a Boolean value indicating whether the document allows copying of content to the Pasteboard.The ability to copy content from 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
Check directly if a PDF in a container allows copying:
MBS( "PDFKit.allowsCopying"; Test::Document )
Shows some properties:
# Load PDF from container
Set Variable [ $pdf ; Value: MBS( "PDFKit.OpenContainer"; Popup Menu::logo ) ]
# Check some properties
Set Variable [ $allowsCopying ; Value: MBS( "PDFKit.allowsCopying"; $PDF ) ]
Set Variable [ $allowsPrinting ; Value: MBS( "PDFKit.allowsPrinting"; $PDF ) ]
Set Variable [ $isEncrypted ; Value: MBS( "PDFKit.isEncrypted"; $PDF ) ]
Set Variable [ $isLocked ; Value: MBS( "PDFKit.isLocked"; $PDF ) ]
# show in dialog
Show Custom Dialog [ "PDF Details" ; "allows copying: " & If($allowsCopying; "yes"; "no") & ¶ &
"allows printing: " & If($allowsPrinting; "yes"; "no") & ¶ &
"is encrypted: " & If($isEncrypted; "yes"; "no") & ¶ &
"is locked: " & If($isLocked; "yes"; "no")]
# release PDF
Set Variable [ $r ; Value: MBS("PDFKit.Release"; $pdf) ]
See also
- PDFKit.allowsPrinting
- PDFKit.isEncrypted
- PDFKit.isLocked
- PDFKit.Open
- PDFKit.OpenContainer
- PDFKit.Release
Created 18th August 2014, last changed 25th November 2019
PDFKit.WriteToPath - PDFKit.allowsPrinting
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins