C# Document Converter Library
C# PDF Convert: How to Convert Dicom Image File to PDF
Converting to PDF File from Dicom Image is Easy to be Performed in C# Project
XDoc.Converter for .NET is an easy to use solution for C# Dicom to PDF conversion. It allows developers to add mature Dicom image to PDF document conversion features into C#.NET project. High conversion speed and accuracy are guaranteed.
C# Coding Sample for Dicom to PDF Conversion
This is a free coding sample for PDF file conversion from Dicom image. Please directly use it in your C#.NET proejct and see the conversion result.
// Used to register all DLL assemblies.
WorkRegistry.Reset();
// Define input and output files path.
String inputFilePath = @"***.dcm";
String outputFilePath = @"***.pdf";
// Convert Dicom to PDF and show conversion result.
ConvertResult result = DocumentConverter.ToDocument(inputFilePath, outputFilePath, FileType.DOC_PDF);
switch (result)
{
case ConvertResult.NO_ERROR:
Console.WriteLine("Success");
break;
case ConvertResult.FILE_TYPE_UNSUPPORT:
Console.WriteLine("Fail: can not convert to PDF, file type unsupport");
break;
case ConvertResult.FILE_TYPE_UNMATCH:
Console.WriteLine("Fail: input file is not a document");
default:
Console.WriteLine("Fail: unknown error");
break;
}