Posted 4 October 2022, 10:35 pm EST
I am using trial license to try the features, and I have encountered an issue when I tried to implement the Azure Functions with exporting PDF to Blob storage.
pageReport.Document.Render(pdfRenderingExtension, outputProvider, pdfSetting);
When the above code executed, there is an exception message.
“This application will be terminated because it was built without a license for PageReport.”
Here is my full code below:-
var outputProvider = new GrapeCity.ActiveReports.Rendering.IO.MemoryStreamProvider();
var pageReport = new GrapeCity.ActiveReports.PageReport(new FileInfo(localFilePath));
var pdfSetting = new GrapeCity.ActiveReports.Export.Pdf.Page.Settings();
var pdfRenderingExtension = new GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension();
pageReport.Document.Render(pdfRenderingExtension, outputProvider, pdfSetting);
using (var fileStream = (MemoryStream)outputProvider.GetPrimaryStream().OpenStream())
{
await blockBlob.UploadFromStreamAsync(fileStream);
responseMessage = blockBlob.Uri.ToString();
}