Hello,
We’re running into an issue with Gembox only happening when we run our application in alpine docker container. It doesn’t happen in macos, Windows, or Ubuntu. It seems there’s missing dependencies we need to install, but we’re not sure what dependencies we need. This’s our code that throws the exception when we try to convert HTML to PDF using Gembox:
var document = DocumentModel.Load(new MemoryStream(Encoding.UTF8.GetBytes(html)), LoadOptions.HtmlDefault);
document.Save(outputStream, SaveOptions.PdfDefault);
Docker base image we’re using: 8.0-alpine3.19
.net version: 8
Dependencies we’re using:
- GemBox.Document: 35.0.1852
- HarfBuzzSharp.NativeAssets.Linux: 7.3.0.2
Anything you could point us to the right direction will be much appreciated. Thank you!
stacktrace:
System.ArgumentNullException: Value cannot be null. (Parameter 'value')\n at \u000E\u001A\u0019\u0018.\u0008(String \u000F)\n at \u000E\u001A\u0019\u0018.\u000F(Object \u000F, String \u0008)\n at \u0003\u000F\u0003\u0019.\u000E(String \u000F)\n at \u000E\u001B\u000F\u0019..ctor(String \u000F)\n at \u0003\u001B\u0002\u0019..ctor(\u0008\u0002\u0005\u0018 \u000F, \u0008\u000F\u0015\u0019 \u0008)\n at \u0005\u001B\u0017\u0019.\u0002\u0016(\u0003\u0002\u0018\u0018 \u000F, \u0005\u0002\u0018\u0018 \u0008)\n at \u0002\u001B\u0002\u0019.\u0006\u0017(\u000E\u0019\u0003\u0018 \u000F, \u0002\u0002\u0017\u0018 \u0008, \u000E\u0005\u0018\u0018 \u0006)\n at \u0002\u001B\u0002\u0019.\u000E\u0019(\u000E\u0019\u0003\u0018 \u000F, \u0002\u0002\u0017\u0018 \u0008, \u000E\u0005\u0018\u0018 \u0006, S8 \u0002, X8& \u0003, Boolean \u000E)\n at \u000E\u0005\u0017\u0019.\u0002\u0005\u001A\u0018\u001B\u0019\u000F\u0017(\u000E\u0019\u0003\u0018 \u000F, \u0002\u0002\u0017\u0018 \u0008)\n at k.\u0006\u000F\u0018(\u0002\u0005\u001A\u0018 \u000F, \u000E\u0019\u0003\u0018 \u0008, \u0002\u0002\u0017\u0018 \u0006, Double \u0002)\n at k.\u0008\u000F\u0018(\u0002\u0005\u001A\u0018 \u000F, String \u0008)\n at k.\u000F\u000F\u0018(\u0002\u0005\u001A\u0018 \u000F, \u0005\u001A\u0019 \u0008)\n at \u0005\u001A\u0019.\u000E\u0017\u0002\u001B\u0019\u0006(k \u000F, \u0002\u0005\u001A\u0018 \u0008)\n at k.\u0006\u001B\u0018(\u0002\u0005\u001A\u0018 \u000F, \u0002\u0015\u0019 \u0008)\n at k.\u0008\u001B\u0018(\u0002\u0005\u001A\u0018 \u000F, \u0002\u0015\u0019 \u0008)\n at k.\u0003\u0019\u0002\u001B\u0019\u0003\u0019(\u0002\u0005\u001A\u0018 \u000F)\n at \u0003\u0019\u0002.\u0008\u0017(\u0002\u0005\u001A\u0018 \u000F, \u0008\u0019\u0002 \u0008, \u000F\u000F\u0019 \u0006, \u0006\u000F\u0019 \u0002, \u0005\u000F\u0019 \u0003, \u0005\u000F\u0019 \u000E)\n at \u000F\u000F\u0019.\u0006\u0002(\u0002\u0005\u001A\u0018 \u000F, \u0008\u0019\u0002[] \u0008, \u0006\u000F\u0019 \u0006, \u0005\u000F\u0019 \u0002, \u0005\u000F\u0019 \u0003)\n at \u000F\u000F\u0019.\u0003\u0017(\u0002\u0005\u001A\u0018 \u000F, Int32 \u0008, \u0008\u0005\u0019 \u0006, \u0006\u000F\u0019 \u0002, \u000F\u0015\u0002 \u0003, \u0006\u0005\u0019 \u000E)\n at \u000F\u000F\u0019.\u0006\u0017(\u0002\u0005\u001A\u0018 \u000F, \u0003\u0005\u001A\u0018 \u0008, Int32 \u0006)\n at \u000F\u000F\u0019.\u000F\u000F\u0019\u001B\u0019\u0006\u0003(Int32 \u000F, Object \u0008, Object \u0006)\n at GemBox.Document.DocumentModelPaginator.dca75czcds9lmgv2y95q5srjljs9plta\u001B\u0019\u000E\u0016(Int32 \u000F, Object \u0008, Object \u0006)\n at \u000F\u001A\u0015\u0019.\u0003\u0016\u0016\u0019\u001B\u0019\u000F(\u0005\u0010\u0019 \u000F, String \u0008, Stream \u0006)\n at \u0002\u0016\u0016\u0019.\u0008\u0016(\u0003\u0016\u0016\u0019 \u000F, \u0005\u0010\u0019 \u0008, Stream \u0006)\n at GemBox.Document.PdfSaveOptions.\u0002\u0019(\u0005\u0010\u0019 \u000F, Stream \u0008)\n at GemBox.Document.PdfSaveOptions.67tg5rkvl9zwp8v7723mndgzuc3b4vj8\u001B\u0019\u0005(\u0005\u0010\u0019 \u000F, Stream \u0008, Boolean \u0006)\n at GemBox.Document.PdfSaveOptions.67tg5rkvl9zwp8v7723mndgzuc3b4vj8\u001B\u0019\u0003(DocumentModel \u000F, Stream \u0008, String \u0006)\n at GemBox.Document.SaveOptions.67tg5rkvl9zwp8v7723mndgzuc3b4vj8\u001B\u0019\u000E(DocumentModel \u000F, Stream \u0008, String \u0006, Boolean \u0002)\n at GemBox.Document.DocumentModel.Save(Stream stream, SaveOptions options)\n```