Hi Team,
I am using the below code to render the image to the PDF with a base 64 string, it is working in local but as soon as i am pushing the code to lambda, the function executes but the PDF is not generated.
string Bucket = Environment.GetEnvironmentVariable(“BUCKETNAME”);
string LicKey = Environment.GetEnvironmentVariable(“ASPOSEKEY”);
Aspose.Pdf.License lic = new Aspose.Pdf.License();
var licenceFile = SetKey(LicKey, Bucket).Result;
lic.SetLicense(new MemoryStream(licenceFile));
Have you tried logging if stream is empty or not inside lambda function? We are afraid that we cannot try to replicate the information with these details. Can you please share some steps on how we can try to reproduce the issue in our environment? We will address it accordingly then.
I have created an AWS lambda serverless function, this when triggered will be executed and should generate a PDF with some content and image/images.
In our code we have an HTML string which has all the data that needs to be converted to PDF. The image/images will be added as base64 string as per my above code snippet.
On further investigation the PDF generated by Lambda is corrupted and if we try to view the content on the lambda in notepad it is having base64 in it.
Best part in this is, the same code works properly and a PDF file is generated when we execute it in our local machine.
The issue could be related to the missing fonts in the environment. Have you tried installing all the Windows fonts? Also, have you tried using Aspose.Pdf.Drawing instead of Aspose.PDF for .NET? Please share the PDF file that has been generated on the server so that we can investigate more and address the issue accordingly.
@asad.ali - Yes i did tried using ASPOSE.PDF.DRAWING and the result is same. Secondly to answer on installation of fonts, we tried doing the same but encountered same errors. I have attached the PDF generated from local and server.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFNET-57795
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hello, I understand the free support policy (ticket is not getting any priorisation nor comittment date), can you inform us where we are in the queue line - approx leadtime to get a fix?
We are afraid that we cannot really share for certain how soon the investigation against this ticket would get completed. It not only depends upon the number of issues in the queue but also the complexity of the issue itself. Nevertheless, your concerns have been recorded and we will surely keep you posted with the progress of ticket resolution. Please spare us some time.
Hello,
I got confirmation today that we are eligible to Paid Support with our company contract. Can you move the request into that backlog? or explain how to. Thank you
You can open a ticket by logging into Paid Support (https://heldesk.aspose.com) while mentioning the issue ID shared in this thread. You can login there using same email address that was used to purchase the paid support subscription. Once you open ticket there, your issue will be escalated accordingly.