Copy
Copies the current form (copies with the shape if it exists).
Parameters:
This method doesn't have any parameters.
Returns:
- Type
-
ApiForm
Example
Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oPictureForm = Api.CreatePictureForm({"key": "Personal information", "tip": "Upload your photo", "required": true, "placeholder": "Photo", "scaleFlag": "tooBig", "lockAspectRatio": true, "respectBorders": false, "shiftX": 50, "shiftY": 50});
oPictureForm.SetImage("https://api.onlyoffice.com/content/img/editor/e-download.png");
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oPictureForm);
var oCopyPictureForm = oPictureForm.Copy();
oParagraph.AddLineBreak();
oParagraph.AddElement(oCopyPictureForm);
builder.SaveFile("docx", "Copy.docx");
builder.CloseFile();
Resulting document