Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Changes the orientation of the page.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 3.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
Value | The new roatation value. From -360 to 360 in 90 degree steps. | 90 |
Returns OK or error message.
See also SetOrientationEx function in DynaPDF manual.
Rotate page 1 of current PDF:
Set Variable [$r; Value:MBS("DynaPDF.EditPage"; $pdf; 1)]
Set Variable [$r; Value:MBS("DynaPDF.SetOrientationEx"; $pdf; 180)]
Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]
Rotate a PDF to 90°:
Let ([
# start new PDF
PDF = MBS("DynaPDF.New");
# read in existing PDF
OpenResult = MBS("DynaPDF.OpenPDFFromContainer"; PDF; Test::InputPDF);
OpenError = MBS("IsError");
ImportResult = MBS("DynaPDF.ImportPDFFile"; PDF );
ImportError = MBS("IsError");
# edit page and rotate
r = MBS("DynaPDF.EditPage"; PDF; 1) ;
r = MBS("DynaPDF.SetOrientationEx"; PDF; 90) ;
r = MBS("DynaPDF.EndPage"; PDF) ;
# save PDF
OutputPDF = MBS("DynaPDF.Save"; PDF; GetAsText(Test::InputPDF));
SaveError = MBS("IsError");
ReleaseError = MBS("DynaPDF.Release"; PDF);
Result = If(
// all okay?
OpenError = 0 and ImportError = 0 and /*rotateError = 0 UND*/ SaveError = 0 and MBS( "Container.GetSize"; OutputPDF; "PDF " ) > 0;
// than return new PDF
OutputPDF;
// return old PDF
Test::InputPDF)
];
result )
This function checks for a license.
Created 18th August 2014, last changed 5th January 2017