How to Set Text and Image Properties
You can use CPDFViewer
's PDFEditActiveHandler
event to set the text and image properties. The following code will show you how to do this.
viewer.PDFEditActiveHandler += Viewer_PDFEditActiveHandler;
private void Viewer_PDFEditActiveHandler(object sender, PDFEditEvent e)
{
//Text properties.
if (e.EditType == CPDFEditType.EditText)
{
e.FontColor = Colors.Red;
e.FontSize = 14;
e.TextAlign = TextAlignType.AlignJustify;
e.UpdatePDFEditByEventArgs();
}
//Image properties.
if (e.EditType == CPDFEditType.EditImage)
{
e.VerticalMirror = true;
e.HorizontalMirror = true;
e.ClipImage = true;
e.Rotate = 90;
e.ReplaceImagePath = "***";
e.UpdatePDFEditByEventArgs();
}
}