Convert PDF

Hi,

How to convert a PDF JPEG2000 to JPEG with PDFNET SDK?

Thanks

Tiago

As a starting point you may want to follow the lines of JBIG2 sample
(http://www.pdftron.com/pdfnet/samplecode.html#JBIG2). In your case
instead of searching for monochrome images, you would search for
images with JPXDecode filter. After you identify JPXDecode-d image
converting it to JPEG is fairly simple. For example (in C++):

pdftron::PDF::Image2RGB img_conv(image); // Normalize the image to 8-
bpc RGB.
pdftron::Filters::FilterReader reader(img_conv);
pdftron::PDF::Image new_image = Image::Create(doc, reader,
image.GetImageWidth(),image.GetImageHeight(),
    8, ColorSpace::CreateDeviceRGB());

// swap the old image with a new one
doc.GetSDFDoc().Swap(new_image.GetSDFObj().GetObjNum(),
old_img_obj.GetObjNum());