ONLYOFFICE/DocumentBuilder

Api.CreateImage incorrect insert by https url in Web DocumentBuilder 5.1.4

ShockwaveNN opened this issue · 2 comments

  1. Send this script to url localhost/docbuilder?async=false
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph, oDrawing;
oParagraph = oDocument.GetElement(0);
oDrawing = Api.CreateImage("https://api.onlyoffice.com/content/img/docbuilder/examples/coordinate_aspects.png", 60 * 36000, 35 * 36000);
oParagraph.AddDrawing(oDrawing);
builder.SaveFile("docx", "CreateImage.docx");
builder.CloseFile();
  1. Download created file

In DocumentServer Web Documentbuilder 5.1.3 (and earlier) will be created this file (with correct inserted image)
CreateImage (2).docx

In DocumentServer Web Documentbuilder 5.1.4 will be created this file without correct image

May be related with new libcurl lib scheme
CreateImage (3).docx

Tryed http image link - seems fine on 5.1.4, image inserted correctly

builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph, oDrawing;
oParagraph = oDocument.GetElement(0);
oDrawing = Api.CreateImage("http://i.imgur.com/FwCrqlU.jpg", 60 * 36000, 35 * 36000);
oParagraph.AddDrawing(oDrawing);
builder.SaveFile("docx", "CreateImage.docx");
builder.CloseFile();

Fixed in ONLYOFFICE/document-server-package#48
verified in 5.1.4.21