Platforms to show: All Mac Windows Linux Cross-Platform

Back to CGPDFDocumentMBS class.

CGPDFDocumentMBS.ArtBox(page as Integer) as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the ArtBox of this page.

Returns nil on any error.
This function is deprecated by Apple in favor of using the CGPDFPageMBS class.

CGPDFDocumentMBS.BleedBox(page as Integer) as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the BleedBox of this page.

Returns nil on any error.
This function is deprecated by Apple in favor of using the CGPDFPageMBS class.

CGPDFDocumentMBS.Catalog as CGPDFDictionaryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Return the document catalog of 'document'.

CGPDFDocumentMBS.Constructor(dataProvider as CGDataProviderMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a Quartz PDF document using a data provider.

Distributing individual pages of a PDF document to separate threads is not supported. If you want to use threads, consider creating a separate document for each thread and operating on a block of pages per thread.

See also:

CGPDFDocumentMBS.Constructor(file as folderitem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a Quartz PDF document using data specified by a file.

Distributing individual pages of a PDF document to separate threads is not supported. If you want to use threads, consider creating a separate document for each thread and operating on a block of pages per thread.

See also:

CGPDFDocumentMBS.Constructor(Handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a Quartz PDF document object based on the given handle value.

Handle must not be zero and should be a valid CGPDFDocumentRef casted to integer.

See also:

CGPDFDocumentMBS.Constructor(url as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a Quartz PDF document using data specified by a URL.

Distributing individual pages of a PDF document to separate threads is not supported. If you want to use threads, consider creating a separate document for each thread and operating on a block of pages per thread.

See also:

CGPDFDocumentMBS.CropBox(page as Integer) as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the CropBox of this page.

Returns nil on any error.
This function is deprecated by Apple in favor of using the CGPDFPageMBS class.

CGPDFDocumentMBS.GetID as CGPDFArrayMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 9.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Gets the file identifier for a PDF document.

A PDF file identifier is defined in the PDF specification as an array of two strings, the first of which is a permanent identifier that doesn't change even when the file is updated. The second string changes each time the file is updated. For more information, see PDF Reference: Version 1.3 (Second Edition), Adobe Systems Incorporated.

Available in Mac OS X v10.4 and later.

CGPDFDocumentMBS.GetInfo as CGPDFDictionaryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 8.6 ✅ Yes ❌ No ❌ No ✅ Yes All
Queries the PDF info dictionary.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.pdf")
dim p as cgpdfdocumentMBS=f.OpenAsCGPDFDocumentMBS

dim Co as CGPDFStringMBS
dim info as CGPDFDictionaryMBS = p.GetInfo
if info.StringValue("Subject",co) then
MsgBox co.Text // shows subject
end if

Returns nil on any error.

CGPDFDocumentMBS.MediaBox(page as Integer) as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the MediaBox of this page.

Returns nil on any error.
This function is deprecated by Apple in favor of using the CGPDFPageMBS class.

CGPDFDocumentMBS.Page(index as Integer) as CGPDFPageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 4.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a page of the document.

CGPDFDocumentMBS.RotationAngle(page as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the rotation of a page in degrees.

Returns 0 on any error.

CGPDFDocumentMBS.TrimBox(page as Integer) as CGRectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the TrimBox of this page.

Returns nil on any error.
This function is deprecated by Apple in favor of using the CGPDFPageMBS class.

CGPDFDocumentMBS.UnlockWithPassword(name as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method 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.

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


The biggest plugin in space...