Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 4.0   4.1   4.2   4.3   4.4   5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0    Statistic  

DynaPDF.RotateTemplate

Rotates a template.

Component: DynaPDF
Version: 7.0
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "DynaPDF.RotateTemplate"; PDF; Template; Rotation )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Template The handle to the template of a page. $template
Rotation The rotation angle.
Can be 0, 90, 180 or 270.
90

Result

Returns template handle or error.

Description

Rotates a template.
Returns a new template handle.
This is a convenience function which creates a new template and draws the existing template there with rotation.

Examples

Import, rotate and place:

#Create new PDF document
Set Variable [$pdf; Value:MBS("DynaPDF.New")]
#Load PDF from container
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromContainer"; $pdf; DynaPDF PlaceTemplate::InputPDF)]
#Import first page as template
Set Variable [$template; Value:MBS("DynaPDF.ImportPageAsTemplate"; $pdf; 1)]
#Create 4 rotations:
Set Variable [$template0; Value:MBS("DynaPDF.RotateTemplate"; $pdf; $template; 0)]
Set Variable [$template90; Value:MBS("DynaPDF.RotateTemplate"; $pdf; $template; 90)]
Set Variable [$template180; Value:MBS("DynaPDF.RotateTemplate"; $pdf; $template; 180)]
Set Variable [$template270; Value:MBS("DynaPDF.RotateTemplate"; $pdf; $template; 270)]
#Make new page and place PDF there in original size (0/0) in position (0/0)
Set Variable [$r; Value:MBS("DynaPDF.AppendPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.PlaceTemplate"; $pdf; $template; 100; 100; 200; 300)]
Set Variable [$r; Value:MBS("DynaPDF.SetStrokeColor"; $pdf; 255; 0; 0)]
Set Variable [$r; Value:MBS("DynaPDF.Rectangle"; $pdf; 100-1; 100-1; 200+2; 300+2; "Stroke")]
Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.AppendPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.PlaceTemplate"; $pdf; $template0; 100; 100; 200; 300)]
Set Variable [$r; Value:MBS("DynaPDF.SetStrokeColor"; $pdf; 255; 0; 0)]
Set Variable [$r; Value:MBS("DynaPDF.Rectangle"; $pdf; 100-1; 100-1; 200+2; 300+2; "Stroke")]
Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.AppendPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.PlaceTemplate"; $pdf; $template90; 100; 100; 300; 200)]
Set Variable [$r; Value:MBS("DynaPDF.SetStrokeColor"; $pdf; 255; 0; 0)]
Set Variable [$r; Value:MBS("DynaPDF.Rectangle"; $pdf; 100-1; 100-1; 300+2; 200+2; "Stroke")]
Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.AppendPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.PlaceTemplate"; $pdf; $template180; 100; 100; 200; 300)]
Set Variable [$r; Value:MBS("DynaPDF.SetStrokeColor"; $pdf; 255; 0; 0)]
Set Variable [$r; Value:MBS("DynaPDF.Rectangle"; $pdf; 100-1; 100-1; 200+2; 300+2; "Stroke")]
Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.AppendPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.PlaceTemplate"; $pdf; $template270; 100; 100; 300; 200)]
Set Variable [$r; Value:MBS("DynaPDF.SetStrokeColor"; $pdf; 255; 0; 0)]
Set Variable [$r; Value:MBS("DynaPDF.Rectangle"; $pdf; 100-1; 100-1; 300+2; 200+2; "Stroke")]
Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]
#done, save to container
Set Field [DynaPDF PlaceTemplate::OutputPDF; MBS("DynaPDF.Save"; $pdf; "Merged.pdf")]
#done, save to container
Set Variable [$r; Value:MBS("DynaPDF.Release"; $pdf)]


DynaPDF.RotateCoords   -   DynaPDF.RoundRect

Feedback: Report problem or ask question.




Links
MBS Realbasic Plugins - Besuchen Sie die JUZ Nickenich Webseite