HEIC to PDF

Hi,

I saw in the following support thread that you were still developing HEIC to PDF:
.heic to pdf - Free Support Forum - aspose.com

Is this still the case or is there now support for this? I can’t see anything online so I’m assuming that its still in development.

I want to be able to do it .NET.

Kind regards

@djsomers1000

Regretfully, we still do not have this task included in our plans. However, can you please share a sample HEIC file along with expected output PDF? We will log a ticket and share the ID with you.

I have not been given a HEIC file as part of my investigation.

I think that we were hoping to expose the capability to convert formats with our customers.

Kind regards

@djsomers1000

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-55665

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.

The issues you have found earlier (filed as PDFNET-55665) have been fixed in Aspose.PDF for .NET 24.9.

@djsomers1000

We’ve implemented new API for integrating FileFormat.HEIC and Aspose.PDF. To convert HEIC images to PDF. You should add the reference to NuGet Gallery | FileFormat.HEIC 24.7.1 and use the following code snippet:

using (var fs = new FileStream("iphone_photo.heic", FileMode.Open))
{
    HeicImage image = HeicImage.Load(fs);
    var pixels = image.GetByteArray(PixelFormat.Rgb24);
    var width = (int)image.Width;
    var height = (int)image.Height;

    var document = new Document();
    Aspose.Pdf.Page page = document.Pages.Add();
    Aspose.Pdf.Image asposeImage = new Aspose.Pdf.Image();
    asposeImage.BitmapInfo = new BitmapInfo(pixels, width, height, BitmapInfo.PixelFormat.Rgb24);
    page.PageInfo.Height = height;
    page.PageInfo.Width = width;
    page.PageInfo.Margin.Bottom = 0;
    page.PageInfo.Margin.Top = 0;
    page.PageInfo.Margin.Right = 0;
    page.PageInfo.Margin.Left = 0;

    page.Paragraphs.Add(asposeImage);
    document.Save("iphone_photo.pdf");
}          

iphone_photo.zip (6.6 MB)