Generate PDF in Azure Web App

Hello,

we want to generate/export PDFs from previously created reports in an Azure Web App. As of version 27 the printer driver is no longer required which was previously the problem.

A very condensed version of the code looks like this:

var listLabel = new ListLabel(new ListLabelLogger());
listLabel.LicensingInfo = "<license>";
listLabel.Printerless = true;
listLabel.ExportOptions.Clear();
listLabel.ExportOptions.Add(LlExportOption.ExportQuiet, "1");
listLabel.ExportOptions.Add(LlExportOption.ExportShowResult, "0");
listLabel.AutoShowSelectFile = false;
listLabel.AutoShowPrintOptions = false;
listLabel.DataSource = new ObjectDataProvider(new List<object> { new object() });
MemoryStream resultStream = new MemoryStream(32000);
var exportConfiguration = new ExportConfiguration(LlExportTarget.Pdf, resultStream, "ReportFile.lst")
{
  ProjectType = LlProject.List
};
listLabel.Export(exportConfiguration);

It runs fine on a lokal development machine but once deployed to an Azure Web App we get this message:

ERROR CXLL28  : LoadLib(<path>\CXLL28EX.LLX) failed
WARNING CXLL28  : LLX loader: <path>\CXLL28EX.LLX is not a library (LoadLibrary() failed)

Can anyone confirm that it is indeed possible to use List Label in Azure Web Apps and maybe post an example?

Thanks!

Hello Sven,
we suspect that the deployment is not complete and possibly the PDF module combit.ListLabel28.ConversionTools.x64 is missing and this is a consequence. Please check which List & Label files were deployed. In the file “restidt.xt” (Documentation directory underneath the List & Label installation) you find an overview of the files required for distribution.

Hi Thomas,
thank you for your swift response. Unfortunately I am not able to track down a missing assembly. Here is a list of all the deployed assemblies:

cmLL2800.chm
cmLL2801.chm
combit.ListLabel28.ConversionTools.x64.dll
combit.ListLabel28.dll
combit.ListLabel28.Export.x64.dll
cxBR28.dll
cxCT28.dll
cxDW28.dll
cxLL28.dll
cxLL2800.lng
cxll2800.ltpl
cxLL2801.lng
cxll2801.ltpl
cxLL2809.lng
cxLL280B.lng
cxLL280D.lng
cxLL2812.lng
cxLL2818.lng
cxLL2819.lng
cxLL281F.lng
cxLL2822.lng
cxLL2825.lng
cxll28bc.llx
cxll28ex.llx
cxll28ht.llx
cxll28oc.llx
cxll28pr.dll
cxll28pw.llx
cxll28xl.dll
cxLS28.dll
cxLS2800.lng
cxLS2801.lng
cxLS2809.lng
cxLS280B.lng
cxLS280D.lng
cxLS2812.lng
cxLS2818.lng
cxLS2819.lng
cxLS281F.lng
cxLS2822.lng
cxLS2825.lng
cxMX28.dll
cxSC28.dll
cxUT28.dll
DocumentFormat.OpenXml.dll
Microsoft.Win32.SystemEvents.dll
System.Data.SQLite.x64.dll
System.Drawing.Common.dll

I even added combit.ListLabel28.Web.dll though I am not sure this one is needed.

Are you able to provide a running C# example that runs in an Azure Web App?

Hi Sven,
sorry, that it is an Azure Web App, we had briefly overlooked. Unfortunately, this is not possible directly, since GDI is blocked here. In your case, you would have to host the app in a Windows Docker container. Unfortunately, there is no other option here. You can find more information about this in this blog.

Ok, thank you for the info. I will look into creating a Docker container then.