Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.RotateTemplate
Rotates a template.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 7.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
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)]
See also
- DynaPDF.BeginTemplate
- DynaPDF.DeleteTemplate
- DynaPDF.DeleteTemplateEx
- DynaPDF.EditTemplate
- DynaPDF.EndPage
- DynaPDF.ImportPageAsTemplate
- DynaPDF.New
- DynaPDF.Rectangle
- DynaPDF.Save
- DynaPDF.SetStrokeColor
Release notes
- Version 9.2
- Fixed problem with DynaPDF.RotateTemplate function and 180 degree.
- Version 9.0
- Added RotateCoords parameter for DynaPDF.RotateTemplate function.
- Version 8.3
- Fixed a problem with DynaPDF.RotateTemplate function.
- Version 7.0
- Added DynaPDF.RotateTemplate function.
Example Databases
Blog Entries
- Things you can do with DynaPDF
- MBS FileMaker Plugin, version 9.2pr3
- MBS FileMaker Plugin, version 8.6pr2
- MBS FileMaker Plugin, version 8.3pr1
- Normalize PDF orientation with MBS Plugins and DynaPDF
- MBS FileMaker Plugin, version 7.0pr2
FileMaker Magazin
This function checks for a license.
Created 7th January 2017, last changed 7th January 2017