Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

CGPDFDocumentMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class CoreGraphics MBS MacCG Plugin 2.7 Yes No No Yes, macOS only No
Function: 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
Notes: If the release property is true, the destructor of this class will release the pdfdocument reference.

Feedback, Comments & Corrections

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 which use this class:


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


CGPDFDictionaryMBS   -   CGPDFObjectMBS




Links
MBS FileMaker tutorial videos