Process gets stuck while Converting PNG to PDF using C#

I am using Aspose.pdf to convert png to pdf format. But somehow one strange file is not working.
It is stuck at pdf.Save(PDFTargetFilePath,SaveFormat.Pdf); line .Its not moving forward from here. vasco733.png (22.7 KB)

Also i am attaching source code here.
public static class PDFConverterTest
{
public static void ConvertPNGTOPDF(string PNGImageFilePath,string PDFTargetFilePath)
{
Aspose.Pdf.Document pdf = new Aspose.Pdf.Document();
Bitmap bitmap = new Bitmap(PNGImageFilePath);
int width = bitmap.Width;
int height = bitmap.Height;
string tmpJpg = GetTempFileName();
bitmap.Save(tmpJpg, ImageFormat.Png);
bitmap.Dispose();
//Create a section in the Pdf object
Page sec2 = pdf.Pages.Add();
//Create an image object in the section
Aspose.Pdf.Image image2 = new Aspose.Pdf.Image();
//Add image object into the Paragraphs collection of the section
sec2.Paragraphs.Add(image2);
//Set the path of image file
image2.File = tmpJpg;
sec2.PageInfo.Width = width + 2.04f;
sec2.PageInfo.Height = height + 2.04f;
pdf.Save(PDFTargetFilePath,SaveFormat.Pdf);
}
static string GetTempFileName()
{
string Temp = “”;
do
{
Temp = Path.GetTempPath() + Path.GetRandomFileName();
} while (File.Exists(Temp));
return Temp;
}
}

@venkat2222

We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as PDFNET-51262. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thank you . Will be waiting for the fix.

Any update on this issue? its been 2 years.

@venkat2222

Regretfully, the ticket could not get resolved due to other pending issues in the queue. However, we have recorded your concerns and will surely update you as soon as we have some news about its resolution. Please spare us some time.

We are sorry for the inconvenience.