Please give a brief summary of your issue:
(Think of this as an email subject)
Bad allocation when using pdftron in Azure
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
I have taken some code to test pdf creation from a template (PDFTron) and everything works fine locally. When I push the code to an App Service running in Azure I get the following exception
Message: document layout failed: bad allocation
Version : 9.2.0-91be0af529
Platform : Windows
Architecture : AMD64
Filename : FlowToPDFConversion.cpp
Function : PDF::DocxConversion::Convert()
Linenumber : 189
As it says bad allocation I was suspecting a memory issue, but I checked the App Service and there is plenty of memory available and when I run the code locally I see no issues in huge memory usage either.
This is the code I’m using:
var templateParams = new
Title = $"Hello world"
using var doc = new PDFDoc();
var templateOptions = new OfficeToPDFOptions();
pdftron.PDF.Convert.OfficeToPDF(doc, "DownloadTemplate.docx", templateOptions);
Can someone help me figure out what’s going wrong?
After trying with latest PDFNet 9.3, we are still facing issue with azure service, in local the microsoft document file converts within seconds to PDF/XOD. however we deploy same code to azure app service (azure functions). we are seeing same issue with above errors or takes lot of time to respond(around 2/3 hours) with the same file. Which is like a small document file of 1.8 mb.