0

I have an ASP.NET Core 6 MVC project. I want to convert my Office files to PDF. But the problem is I take my files as byte array and I must convert them to byte array pdf.

I tried to use gotenberg api but not worked. And also I asked this , but not worked too.

Note: I do not want to take any string path, I want to convert my byte array to PDF byte array.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
KOMODO
  • 72
  • 1
  • 8
  • 1
    I'm afraid you can't do that. To convert the office file to pdf, you might need to use the Microsoft.Office.Interop.Word package, but it not support in the Asp.net core application. Refer to this thread: [How do I convert Word files to PDF programmatically?](https://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically). – Zhi Lv Aug 16 '22 at 07:21
  • The [DocumentConverter](https://www.leadtools.com/help/sdk/dh/doxc/documentconverter.html) class from the LEADTOOLS SDK (Available from a [NuGet package](https://www.leadtools.com/downloads/nuget?nuget_package=Leadtools.Document.Sdk)) uses a [LEADDocument](https://www.leadtools.com/help/sdk/dh/dox/leaddocument.html) object from an input stream and convert it to PDF output in a stream by setting [DocumentConverterJobData.OutputDocumentStream](https://www.leadtools.com/help/sdk/dh/doxc/documentconverterjobdata-outputdocumentstream.html). (Disclaimer: I work for the vendor of the toolkit) – Hussam Barouqa Jan 12 '23 at 15:24

0 Answers0