Hello,
Is it possible to rotate a set of element at the same time ? by putting it in a group , for example ? If yes, how ?
Thank you
Rotate Multi Element
Re: Rotate Multi Element
Forum member · Sep 19, 2016Hello,
The solution is ceTe.DynamicPDF.PageElements.TransformationGroup.
Thanks,
Re: Rotate Multi Element
Support · Sep 19, 2016Hello,
Yes, you can rotate a set of page elements at the same time by putting them in a TransformationGroup page element of DynamicPDF API. Please refer to the documentation on TransformationGroup page element here
. Also below is the code sample.
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
// Create a transformation group and add a rectangle and label to it
Label label = new Label("This text is inside a TransformationGroup.", 0, 100, 300, 12);
Rectangle rectObj = new Rectangle(0, 0, 75, 75, RgbColor.Blue, RgbColor.Blue);
TransformationGroup group = new TransformationGroup(100, 100, 200, 200, 0);
group.Add(label);
group.Add(rectObj);
//Set some angle to the group to rotate all the page elements in it.
group.Angle = 45;
// Add the transformation group to the page
page.Elements.Add(group);
document.Draw(@"C:\Temp\MyDocument.pdf");
Thanks,
ceTe Software Support Team.