ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
[X] I have used the search tool and did not find an issue describing my bug.
Operating System of DocumentServer
Linux (DEB package)
Version information
7.2.1.34
Expected Behavior
I can change the size of an ApiTextForm using the ToFixed method, and the ToFixed method of ApiPictureForm should be the same.
Actual Behavior
The ToFixed method of ApiPictureForm has no effect. It always looks to stay the same size.This is the case with the example of the official website.
Reproduction Steps
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/docbuilder/examples/user-profile.png");
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oPictureForm);
oPictureForm.ToFixed(2 240, 2 240);
// the example of the official website is oPictureForm.ToFixed(10 240, 10 240);
// Whether it's 2 or 10, the oPictureForm size is the same
var bFixed = oPictureForm.IsFixed();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("The first form from this document has a fixed size: " + bFixed);
oDocument.Push(oParagraph);
builder.SaveFile("docx", "ToFixed.docx");
builder.CloseFile();
This issue is unique.
Operating System of DocumentServer
Linux (DEB package)
Version information
7.2.1.34
Expected Behavior
I can change the size of an ApiTextForm using the ToFixed method, and the ToFixed method of ApiPictureForm should be the same.
Actual Behavior
The ToFixed method of ApiPictureForm has no effect. It always looks to stay the same size.This is the case with the example of the official website.
Reproduction Steps
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/docbuilder/examples/user-profile.png"); var oParagraph = oDocument.GetElement(0); oParagraph.AddElement(oPictureForm); oPictureForm.ToFixed(2 240, 2 240); // the example of the official website is oPictureForm.ToFixed(10 240, 10 240); // Whether it's 2 or 10, the oPictureForm size is the same var bFixed = oPictureForm.IsFixed(); oParagraph = Api.CreateParagraph(); oParagraph.AddText("The first form from this document has a fixed size: " + bFixed); oDocument.Push(oParagraph); builder.SaveFile("docx", "ToFixed.docx"); builder.CloseFile();
Additional information
No response