Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGPDFDocumentMBS class.

CGPDFDocumentMBS.AllowsCopying as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Return true if 'document' allows copying; false otherwise.

Typically, this function returns false only if the document is encrypted and the document's current password doesn't grant permission to perform copying.
(Read only property)

CGPDFDocumentMBS.AllowsPrinting as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Return true if 'document' allows printing; false otherwise.

Typically, this function returns false only if the document is encrypted and the document's current password doesn't grant permission to perform printing.
(Read only property)

CGPDFDocumentMBS.handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The handle for this pdfdocument.

Handle is a CGPDFDocumentRef.
(Read and Write property)

CGPDFDocumentMBS.IsEncrypted as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Return true if the PDF file associated with 'document' is encrypted; false otherwise.

If the PDF file is encrypted, then a password must be supplied before certain operations are enabled; different passwords may enable different operations.
(Read only property)

CGPDFDocumentMBS.IsUnlocked as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Return true if 'document' is unlocked; false otherwise.

A document is unlocked if it isn't encrypted, or if it is encrypted and a valid password was previously specified with CGPDFDocumentUnlockWithPassword.
(Read only property)

CGPDFDocumentMBS.MajorVersion as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the major version of the pdf document.

(Read only property)

CGPDFDocumentMBS.MinorVersion as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the minor version of the pdf document.

(Read only property)

CGPDFDocumentMBS.PageCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Counts the pages inside the PDF document.
Example
dim f as FolderItem
dim d as CGPDFDocumentMBS

f=SpecialFolder.Desktop.Child("test.pdf")
d=f.OpenAsCGPDFDocumentMBS

MsgBox str(d.PageCount)

Returns 0 on any error.
(Read only property)

The items on this page are in the following plugins: MBS MacCG Plugin.


The biggest plugin in space...