CGPDFDocumentMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

CGPDFDocumentMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreGraphics MBS MacCG Plugin 2.7 ✅ Yes ❌ No ❌ No ✅ Yes All
A class for a core graphics pdf document.
Example
dim f as FolderItem
dim input as CGPDFDocumentMBS
dim output as CGContextMBS
dim r,c as CGRectMBS

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

r=CGMakeRectMBS(0,0,200,200) // 200 by 200 Pixel page

f=SpecialFolder.Desktop.Child("output.pdf")
output=f.NewCGPDFDocumentMBS(r,"SomeTitle","SomeAuthor","SomeCreator")

// Create a new page
output.BeginPage r

// get size of input page one
c=input.CropBox(1)

// clip to a part of the new page leaving a border
r=CGMakeRectMBS(20,20,160,160)
output.ClipToRect r

// draw old pdf on a different position
c.top=-100
c.left=-100

// do the drawing of page one of input at new new output
output.DrawCGPDFDocument(input,c,1)

// cleanup
output.EndPage
output.Flush

If the release property is true, the destructor of this class will release the pdfdocument reference.

This class has no sub classes.

Some useful global functions for this class:

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


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


CGPDFDictionaryMBS   -   CGPDFObjectMBS


💬 Ask a question or report a problem