Platforms to show: All Mac Windows Linux Cross-Platform

Back to PDFPageMBS class.

PDFPageMBS.attributedString as NSAttributedStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
String (with linefeeds and in some cases spaces inserted) representing the text on the page.

(Read only property)

PDFPageMBS.CGPDFPageHandle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes All
The CoreGraphics PDFPage handle.

(Read only property)

PDFPageMBS.dataRepresentation as memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns PDF data (a proper PDF document) consisting of a single page (this page).

Note, external page links are not preserved.
(Read only property)

PDFPageMBS.displaysAnnotations as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Method to turn on or off the display of annotations when the page is drawn.

(Read and Write property)

PDFPageMBS.document as PDFDocumentMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The PDFDocument the page is associated with.

(Read only property)

PDFPageMBS.label as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The page label. Usually "1" for the first page, "2" for the second, etc.

(Read only property)

PDFPageMBS.numberOfCharacters as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Number of characters on the page (including linefeeds and spaces inserted).

(Read only property)

PDFPageMBS.rotation as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Rotation on a page.

Must be 0, 90, 180 or 270 (negative rotations will be "normalized" to one of 0, 90, 180 or 270).
Some PDF's have an inherent rotation and so rotation may be non-zero when a PDF is first opened.
(Read and Write property)

PDFPageMBS.stringValue as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property PDFKit MBS PDFKit Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
String (with linefeeds and in some cases spaces inserted) representing the text on the page.
Example
dim p as PDFDocumentMBS
dim f as FolderItem

f=SpecialFolder.Desktop.Child("test.pdf")
p=new PDFDocumentMBS(f)

MsgBox "Text from first page:"+EndOfLine+EndOfLine+p.pageAtIndex(0).stringValue

If you need to extract the text of a PDF document page cross platform or with more options, you may want to look on the DynaPDF plugin.

It seems like this string value is not always available. It works for PDF Documents created from a disc file, but not for files our test app created on runtime in memory by using PDFDocument constructor and insertpage.
(Read only property)

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


The biggest plugin in space...