I have tested to create a pdf file from a heic image file. I tested this code example “Convert HEIC to PDF via C# | products.aspose.com” but this throws a NullReferenceException when calling Aspose.Imaging.Image.Load(heicFile). I used a console app with .Net 6.0 and 8.0 and the newest nuget packages for Aspose.Pdf (24.9.0) and Aspose.Imaging.Heic.Adapter (
My code was this:
using Aspose.Imaging.HEIC.Adapter;
using Aspose.Imaging.ImageOptions;
using Aspose.Pdf;
namespace AsposeWordTest
{
internal class AposePdf
{
public void ConvertHeicToPdf()
{
var heicFile = @“c:\users\xx\downloads\20220228_212000.heic”;
HEICImage.Register();
// the next line throws a NullReferenceException
using (var image = Aspose.Imaging.Image.Load(heicFile))
{
// Save image to pdf
image.Save(@"C:\Users\xx\Downloads\asposeTest\outputHeic.pdf", new PdfOptions());
}
}
}
}
I have updated again nuget packages. Now the code runs without exception, but it always shows that the pdf is created without licence. How do I have to include my Aspose.Total licence? Please update your example code.