Flattens this control to its parent page. In effect, replaces the control with its
appearance.
Namespace:
BitMiracle.Docotic.Pdf
Assembly:
BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)
Syntax
Exceptions
Remarks
Flattening locks control from editing. Flattening can significantly reduce file
size if RemoveUnusedObjects property is set to true.
This method flattens the control in 2 steps:
-
Draws control on its parent page using text and vector graphics operators.
-
Removes control from the document and from the Controls
collection of its parent page.
NOTES:
- Do not use this control after successful flattening. The flattened control is
detached from its document.
-
This method modifies Controls collection so do not use
Flatten() method within foreach (var control in page.Controls) loop.
- This method can change graphics state of the page. To avoid possible side effects,
call the method right before saving of the document.
See Also