GotenbergSharpApiClient
GotenbergSharpApiClient copied to clipboard
Convert single office file to pdf
As I understand you have to use GotenbergSharpClient.MergeOfficeDocsAsync for converting office files. But there is limitation that only allows 2 or more files to be converted. There is check for that: https://github.com/ChangemakerStudios/GotenbergSharpApiClient/blob/2464c8bcd0af9198c208b1e0fa1b1d0468b7dfa7/lib/Domain/Requests/MergeOfficeRequest.cs#L39-L40 Although Gotengberg docs shows that you could also use only one file. Is there a reason for this limitation or should I use some other method?
I ran into this as well, can confirm that the gotenberg API allows to merge just one document and this is the only way to convert office docs, there is no other method in the client for doing a single document. Also it ends up sending a request with no form content if you try to do this leading to a very confusing error. Recommend allowing 1 valid merge item and throwing and exception if there are none. @Jaben @chrismo111, permission to open a pull request or something?
A fix has been added for the v7 branch.
Released in v2.0.1