We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue while converting bmp and jpeg images to pdf

Hi Team,

When converting from BMP,JPEG images to PDF_A_2U format, the images seemed to be stretched and as a result the images are less readable.

Request to help on the same

Thanks,
Aswin

@Aswin_R

Are you evaluating our on-premises (.NET/Java) API or the free web app? Could you please also share the problematic image file?

0002c2808001517e.jpg (344.7 KB)
0002c28080015180.png (340.5 KB)
0002c2808001517e.pdf (397.8 KB)
0002c28080015180.pdf (687.5 KB)
Hi Atir Tahir,

Thanks for the reply.

We are using licensed version of Aspose. It’s in-premise setup license

Also, please find the original and converted images attached

A small correction, the image formats reported are JPEG and PNG format

Thanks,
Aswin Radhakrishnan
0002c2808001517e.jpg (345 KB)
0002c28080015180.png (307 KB)
0002c2808001517e.pdf (398 KB)
0002c28080015180.pdf (687 KB)

@Aswin_R

You are using old version of Aspose.PDF for Java. Please upgrade to the latest version of Aspose.PDF for Java 22.1 and let us know how it goes on your side. If you still face problem, please create a simple Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing. We will investigate the issue and provide you more information on it.

Hi Tahir,

Thanks for the reply

As advised, we have applied the suggested version of aspose-pdf 22.1 but still the desired result was not met

Please find the sample code snippet:

                    Document doc = new Document();
		// Add a page to pages collection of document
		Page page = doc.getPages().add();
		// Load the source image file to Stream object
		//java.io.FileInputStream fs = new java.io.FileInputStream(path);
		java.io.FileInputStream fs = new java.io.FileInputStream("D:\\Temp\\jpg2.jpg");
		// Create an image object
		Image image1 = new Image();
		// Add the image into paragraphs collection of the section
		page.getParagraphs().add(image1);
		// Set the image file stream
		image1.setImageStream(fs);
		// Save resultant PDF file
		doc.save("D:\\Temp\\test.pdf");
		logger.debug("Jpeg file converted to pdf successfully");

Thanks,
Aswin

@Aswin_R

We have logged this problem in our issue tracking system as PDFJAVA-41273. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Tahir,

Thanks again for coming back, Can you provide us an time frame for this issue resolution so we can update our client on the same since we are due to deploy this in our Production system,

We already have Aspose License based on Singapore

Thanks,
Aswin

@Aswin_R

Currently, your issue is pending for analysis and is in the queue. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

Hi Tahir,

Is there any update on the issue

Thanks,
Aswin

@Aswin_R

Unfortunately, there is no update available on your issue. We will be sure to inform you via this forum thread once there is any update available on it.

Hi Tahir,

It has been almost 2 weeks since we had asked for an update.

Can you please check and provide an update

We have already procured license from Aspose.

Thanks,
Aswin

@Aswin_R

We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

We will be sure to inform you via this forum thread once there is any update available on your issue.