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.
PFA sample multi-frame dicom, while converting to pdf. only one-page pdf is generating.
(I tried uploading but it’s not showing , even I tried ZIP file and PDF file.) help me out on this if you also not able to see attachment
I have worked with source file shared by you using Aspose.Imaging for .NET 18.11 and unable to observe any issue. I have also shared my generated result with you for your kind reference. Please check attachment. Can you please share environment details along with which Aspose.Imaging version you are using on your end and screenshot pointing towards issue so that we may further investigate to help you out.bmode.pdf (118.8 KB)
Thank you for your reply. But I have observed that I have shared you multi frame DICOM file which has 37 frames in it. But Output is only a single frame.
As per my understanding It should generate all 37 frames in PDF.
Can you please provide the desired output PDF that you want to generate using API. Please also provide the information about error that you observe on your end while using the sample code given your following post.
Provided code is working and generation multipleple pdf files. as in our given dicom 37 frames are there so 37 pdf files got generated.
What i was asking is that: Is it possible to generated single pdf file for all the frames means 37 frames so 37 pages in a single pdf file. instead of giving 37 pdf file with single page.
I do not have any sample file to show you. I hope you would understand my requirement.
I request you to please use Aspose.PDF for merging of generated PDF files into a single documents. Aspose.Imaging generates separate PDF for frames. I hope the suggested solution will work.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.