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.
Hi Sven,
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,
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,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
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
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.
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
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.
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…
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.
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.