Platforms to show: All Mac Windows Linux Cross-Platform

CGNewPDFDocumentMBS(consumer as CGDataConsumerMBS, MediaBox as CGRectMBS, title as string, author as string, creator as string) as CGPDFContextMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method CoreGraphics MBS MacCG Plugin 12.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a PDF document.

Title, author and creator are all optional.
Requires Mac OS X to work.
Keep yourself a reference to the consumer object so RB does not release it resulting in a crash.

Some examples using this global method:

CGNewPDFDocumentMBS(file as folderitem, MediaBox as CGRectMBS, title as string, author as string, creator as string, subject as string, keywords as string, OwnerPassword as string, UserPassword as string, AllowsPrinting as boolean, AllowsCopy as boolean) as CGPDFContextMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method CoreGraphics MBS MacCG Plugin 12.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a PDF document.

Title, Author, Creator, Subject and Keywords parameters can be empty.

If OwnerPassword and UserPassword are filled in the PDF is encrypted and AllowsPrinting/AllowsCopy define what the user can do after he entered his password.

The passwords must be a string which can be represented in ASCII encoding; only the first 32 bytes will be used for the password.

Requires Mac OS X to work.

See also:

Some examples using this global method:

CGNewPDFDocumentMBS(file as folderitem, MediaBox as CGRectMBS, title as string, author as string, creator as string, subject as string, keywords as string, OwnerPassword as string, UserPassword as string, AllowsPrinting as boolean, AllowsCopy as boolean, KeyLength as Integer) as CGPDFContextMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method CoreGraphics MBS MacCG Plugin 12.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a PDF document.

Title, Author, Creator, Subject and Keywords parameters can be empty.

If OwnerPassword and UserPassword are filled in the PDF is encrypted and AllowsPrinting/AllowsCopy define what the user can do after he entered his password. #

The passwords must be a string which can be represented in ASCII encoding; only the first 32 bytes will be used for the password.

Keylength must be a value between 48 bit and 128 bit in 8 bit steps. 0 uses default value.

Requires Mac OS X to work.

See also:

Some examples using this global method:

Xojo Developer Magazine

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


The biggest plugin in space...