ONLYOFFICE / DocumentBuilder

ONLYOFFICE Document Builder is powerful text, spreadsheet, presentation and PDF generating tool
https://www.onlyoffice.com/document-builder.aspx
GNU Affero General Public License v3.0
111 stars 54 forks source link

Call `Api.CreateImage` with url result broken file on Windows #26

Closed ShockwaveNN closed 1 month ago

ShockwaveNN commented 5 years ago
  1. Run this script on Windows
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();

In result will be created broken file of 1KB size.

This issue only actual on Windows, on centos and ubuntu everything is fine. Also Api.CreateImage will not result broken file if use base64 inside

Tested on:

Windows 10
v5.3.3.30
sdk version:  5.3.3 (build:61)
FFF0220 commented 3 years ago

Has this bug been solved, please?

ShockwaveNN commented 3 years ago

Sorry, this issue is still actual in v6.0.0 of DocumentBuilder (will be released very soon) This issue require some addition functions to be implemented on Windows

If this is critical for you - you can use base64 encoding to create image, or use Linux version for thich this bug is not actual

FFF0220 commented 3 years ago

Sorry, this issue is still actual in v6.0.0 of DocumentBuilder (will be released very soon) This issue require some addition functions to be implemented on Windows

If this is critical for you - you can use base64 encoding to create image, or use Linux version for thich this bug is not actual

ok, thanks.

ShockwaveNN commented 2 years ago

I've created issue 54528 in our private issue tracker

Nothing changed for issue by itself, but we change our bug tracking guidelines since original issue was filed in 2019 Problem actual in current stable version of DocumentBuilder on windows

askonev commented 10 months ago

bug is not repeated on the version:

windows 10
v7.5.0.128
sdk version:  7.5.0 (build:128)
Rita-Bubnova commented 1 month ago

I close this issue. Feel free to comment or reopen it if you got further questions.