Jpeg2000 file to pdf conversion problem

I’ve got a problem when converting Jpeg2000 file to pdf using Aspose.PDF

The picture from Jpeg2000 is always very small when shown in pdf. I tried different sizes and resolutions but no effect.

The Jpeg conversion works ok as well asTiff, Gif, Png.


My code is based on the example:

http://www.aspose.com/docs/display/pdfjava/How+to+Convert+an+Image+to+PDF

I have attached the files that I've used for testing

Hi Henryk,

Thanks for contacting support.

I have tested the scenario using sample images while you have shared and as per my observations, I am able to set width/height of JPEG2000 images. For the sake of testing, I have used page14.jp2 file. Since the JPEG2000 file is quite small, so increasing the dimensions (Width x Height) of image results in distorted output.

Java

//Instantiate a Pdf object by calling
Pdf pdf1 = new Pdf();

//Create a section in the Pdf object
Section sec1 = pdf1.getSections().add();

//Create an image object in the section
aspose.pdf.Image img1 = new aspose.pdf.Image(sec1);

//Add image object into the Paragraphs
collection of the section
sec1.getParagraphs().add(img1);

//Set the path of image file
img1.getImageInfo().setFile("C:\\pdftest\\test_files\\page14.jp2");
img1.getImageInfo().setImageFileType(aspose.pdf.ImageFileType.Jpeg);
img1.getImageInfo().setFixHeight(600);
img1.getImageInfo().setFixWidth(500);

//Save the Pdf
pdf1.save("C:\\pdftest\\test_files\\page14.pdf");

Hello
Thank you for the reply but the page14.jp2 file is not that small. According to the Photoshop:
width 2480 px
height: 3508 px
resolution 300 ppi

Please try to convert page3.jpg file(according to Photoshop it has the same dimensions) to pdf. The pdf produced has better quality (then the pdf produced from page14.jp2) and the jpeg file is placed on the whole page - not scaled down.

I have attached the relevant files and screenshots wih files data from Photoshop (in gif format).

Regards
Henryk

Hi Henryk,


Thanks for sharing the details.

I have tested the scenario and I am able to
notice the same problem. For the sake of correction, I have logged this issue
as PDFNEWJAVA-33845 in our issue tracking system. We will further
look into the details of this problem and will keep you updated on the status
of correction. Please be patient and spare us little time. We are sorry for
this inconvenience.

I have not heard from you for some time.
I am wondering if the problem has been solved?

Hi Henryk,


Thanks for your inquiry. I am afraid above reported issue is still not resolved and it is pending for investigation in the queue with other priority tasks. However, we have requested our development team to complete its investigation and share an ETA at their earliest. We will update you as soon as we get a feedback.

We are sorry for the inconvenience caused.

Best Regards,