I have a code which gets byte array from my database and sends it to convertAPI to convert it as PDF.
When I download the doc as is it works fine (so no issue with the byte[] or document), but when I send the stream to ConvertAPI the resultant PDF is all garbled and has more than 200 pages (the doc only has 1 page). the document does contain image and Chinese text.
here is my code (application is written in C# web api):
var convertApi = new ConvertApi("<my key>");
var stream = new MemoryStream(documents[0].content);
var convertToPdf = await convertApi.ConvertAsync("doc", "pdf",
new ConvertApiFileParam(stream, "test.doc")
);
var outputStream = await convertToPdf.Files[0].FileStreamAsync();