PDF with JPEG 2000

We have a PDF with a background image in JPEG 2000 format. When converting the PDF into a JPG with the JpegDevice.Process method the resulting JPEG is not as expected and the background is totally unusable.


Is JPEG 2000 supported as an image in a PDF for the JpegDevice?

Regards,
Sven

Hi Sven,


Thanks for using our API’s.

Can you please share the resource/input PDF files with JPEG 2000 image as background, so that we can test the conversion in our environment. We are sorry for your inconvenience.

Hi Nayyer,

I am sorry, but the PDF’s we have do contain sensitive data so I am not allowed to send any PDF to you.

Do you know, if JPEG 2000 is supported or not?

Kind regards,
Sven

Hi Sven,


During our initial tests, we noticed that JPG2000 is currently not supported by our API. However for the sake of implementation, we already have logged it as PDFNEWNET-19388 in our issue tracking system. However concerning to your issue, the problem varies from document to document, so in order to specifically resolve the issues which you are facing, we requested you to please share the resource files.

Please note that all the documents shared by our customer are only used for testing purpose and once a particular issue is resolved, they are removed from our system. Furthermore, for your convenience, I have also marked this forum thread as private so that the contents shared in this thread are only accessible to Aspose staff.

Hi Nayyer,



thank you. We finally found a PDF which does not contain sensitive data.



We use this code to convert the PDF into a JPEG:



using (var pdf = new Aspose.Pdf.Document(stream))

{

var pdfPage = pdf.Pages[page.InnerPage];

var device = new JpegDevice(new Resolution(150), 70);



using (var outStream = new MemoryStream())

{

device.Process(pdfPage, outStream);



return outStream.ToArray();

}

}



Thanks!



Sven

sven9:
Hi Nayyer,

thank you. We finally found a PDF which does not contain sensitive data.

We use this code to convert the PDF into a JPEG:

using (var pdf = new Aspose.Pdf.Document(stream))
{
var pdfPage = pdf.Pages[page.InnerPage];
var device = new JpegDevice(new Resolution(150), 70);

using (var outStream = new MemoryStream())
{
    device.Process(pdfPage, outStream);

    return outStream.ToArray();
}

}

Thanks!

Sven

Hi Sven,

Thanks for sharing the resource files.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-38746. We
will investigate this issue in details and will keep you updated on the status
of a correction. <o:p></o:p>

We apologize for your inconvenience.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan

What is the state of this issue? I tried latest Aspose.Pdf lib and it seems it still cannot handle well PDFs with JPEG2000 images.

Thanks,
Tamás

@tvinczesn

Thank you for contacting support.

We would like to update you that PDFNET-19388 will tentatively be resolved in Aspose.PDF for .NET 19.3 which is expected to be released around second week of March 2019. We will notify you in this thread as soon as it will be resolved. We appreciate your patience in this regard.

@Farhan.Raza

Thank you for the update.

Is there any workaround until then? For ex.: can we detect and convert the PDF images into another format using Aspose to be able to get proper preview images?

Thanks,
Tamás

@tvinczesn

We are afraid any workaround approach may not be available at the moment. We have recorded your concerns and will let you know as soon as any significant update will be available in this regard. Please be patient and spare us little time.

Is there any update on this issue? Tried Aspose.PDF 19.12 with no success.

Thanks.

@Stafi1o

Regretfully the linked issues are not yet resolved due to other high priority implementations in the API. However, we will share within this forum thread as soon as there are some updates in this regard. Please spare us some time.

I’m running into the same issue. It’s been five years and still no solution…

@Azure

Are you facing an issue while converting the PDF to image? OR you are concerned with JPEG-2000 format? Please let us know about the details of the issue by providing a sample code and input/output files. We will further proceed to assist you accordingly.

I’m receiving scanned PDFs from customers that contain JPEG2000 images. These PDFs can’t be converted to images by Aspose, the result is unreadable.

I’ll gladly send you a sample PDF (how do I send a private attachment?), the code I use to convert to images boils down to the same code provided by @sven9 five years ago.

Edit: I’ve sent you a private message.

@Azure

Thanks for sharing the details in private message.

We would like to share with you that original ticket logged for the support of JPG2000 format was PDFNET-19388. The second ticket is regarding the conversion issue where source PDF contains image of same file format. The issue is clearly due to the lack of support in the API for this particular file format.

Furthermore, we have been investigating the feasibility to add support for JPEG-2000 files in the API and we intend to provide it next year (in early months). We have updated the information of logged ticket as per your provided details and will surely inform you as soon as logged tickets are resolved. Please give us some time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-38746) have been fixed in Aspose.PDF for .NET 24.1.