Hi Team,
I am from PHILIPS India Ltd. and evaluating Aspose products for my project.
I am trying to convert a DICOM file (.dcm) to PDF. But its working with simple Dicom file. Dicom file with multiple frames and Dicom file with annotation giving errors.
below code snippet:
using (DicomImage image = (DicomImage)Aspose.Imaging.Image.Load(TempFileName))
{
Aspose.Imaging.ImageOptions.PdfOptions exportOptions = new
Aspose.Imaging.ImageOptions.PdfOptions();
exportOptions.PdfDocumentInfo = new Aspose.Imaging.FileFormats.Pdf.PdfDocumentInfo();
image.Save(Destination, exportOptions);
//DicomImage.Save
}
I tried this also:
using (Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document())
{
pdfDocument.Pages.Add();
Aspose.Pdf.Image image = new Aspose.Pdf.Image();
image.FileType = ImageFileType.Dicom;
image.File = TempFileName;
pdfDocument.Pages[1].Paragraphs.Add(image);
// Save output as PDF format
pdfDocument.Save(Destination);
}
Please let me know, Is it possible to convert all types of Dicom files to pdf via using the Aspose family product. If yes then how? C# code would be very useful.