Some test text!

Convert from DICOMkeyboard_arrow_down

Convert DICOM to PDF in Node.js

Advanced imaging module is a new optional add-on utility which can be used with PDFTron SDK 9.0 or later to convert DICOM and other imaging formats such as AAI, ARW, DCR and RAF to PDF without any external dependencies using the PDF.Convert.FromDICOM method with this module. Alternatively, the method PDF.Convert.ToPDF can also be used for conversion of images to PDF format and is the more recommended option for all imaging formats other than the DICOM format.

You can find more details about how to install advanced imaging module here.

linkSupported formats

The module is primarily designed to convert DICOM images to PDF documents. However, conversion of many other advanced imaging formats such as AAI, ARW, DCR and RAF are also supported.


To use the advanced imaging module, you must use the PDFNet.AddResourceSearchPath method with the path to the module's Lib/ folder to include the module files.

Requires the advanced imaging module add-on
const main = async () => {
  // use a try-catch block here to catch PDFNetException
  if (!(await PDFNet.AdvancedImagingModule.isModuleAvailable())) 
    console.log("PDFTron SDK Advanced Imaging module not available.");
PDFNet.runWithCleanup(main).then(function(){ PDFNet.shutdown(); });

If the module has been successfully added, you can use the Convert.FromDICOM method. This method requires that you pass in a PDFDoc object that will append converted pages to the specified PDF document.

const doc = await PDFNet.PDFDoc.create();
await PDFNet.Convert.fromDICOM(doc, input_file_path + input_file_name, null);
await + output_file_name, PDFNet.SDFDoc.SaveOptions.e_linearized);

linkConversion options

You can also optionally provide a AdvancedImagingConvertOptions as an argument to set a DefaultDPI for the image. If no DPI can be deduced from the existing image, then the default DPI provided will be used as the DPI for the final converted document. If this option is not used, a DPI value of 72.0 will be used to create the output. For DICOM images, Pixel Spacing attribute is used to determine the DPI of the image.

const opts = new PDFNet.Convert.AdvancedImagingConvertOptions();

await PDFNet.Convert.fromDICOM(doc, inputPath + input_file_name, opts);


The advanced imaging module ships with the AdvancedImagingTest sample which can be used to test the conversion functionality using provided test files or your own documents. The sample first initializes PDFNet, which is required for all PDFTron SDK functionality, then uses PDFNet.AddResourceSearchPath to include the advanced imaging Module. The same lines of code can be used to integrate the module in your application or project.

Get the answers you need: Support


Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.