Class JpegConverter

Info

Represents Documentize.JpegConverter plugin. Used to convert PDF documents into JPEG format.

public static class JpegConverter

Inheritance

objectJpegConverter

Inherited Members

Examples

The example demonstrates how to convert PDF document into JPEG format.

// Create PdfToJpegOptions object to set instructions
var options = new PdfToJpegOptions();
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Perform the process
JpegConverter.Process(options);

The example demonstrates how to convert PDF document into JPEG format with settings for pages, resolution, quality.

// Create PdfToJpegOptions object to set instructions
var options = new PdfToJpegOptions();
// Process only the first page
options.PageList = [1];
// Set output resolution to 200 DPI
options.OutputResolution = 200;
// Set output quality to 50
options.Quality = 50;
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Perform the process
JpegConverter.Process(options);

The example demonstrates how to convert PDF document into JPEG format to streams.

// Create PdfToJpegOptions object to set instructions
var options = new PdfToJpegOptions();
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Perform the process
var results = JpegConverter.Process(options);
// Get stream results
foreach (var result in results.ResultCollection)
{
    var streamResultPage1 = result.ToStream();
}

Methods

Process(PdfToJpegOptions)

Converts PDF document into JPEG format.

public static ResultContainer Process(PdfToJpegOptions options)

Parameters

  • options PdfToJpegOptions: An options object containing instructions for the Documentize.JpegConverter.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

 English