Aspose.Cells Excel2Pdf with embedded images

Hello, dear colleagues.

We’ve found another problem with Excel 2 PDF conversion. Our Excel document contains an embedded picture of a 2-dimensional barcode.

We make a test to scan barcode by specific hardware that scans printed document and detects a barcode on it.

So the test successfully passes if we’re trying to scan barcode on a paper, printed from an Excel file.

But if we try to scan barcode on a paper, printed from pdf generated by Aspose.Cells from the Excel file used earlier, the test fails. Barcode is unrecognizable by hardware.

What is the reason for such behavior? Can you help us to get rid of this problem?

You can find sample files in attachment.

Here you can find some code that we use to convert xls to pdf:

_________________________________________________
Workbook workbook = new Workbook("ExcelSource.xls");
workbook.calculateFormula();

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(SaveFormat.PDF);
pdfSaveOptions.setImageResample(500, 100);
pdfSaveOptions.setImageType(ImageFormat.getPng());

workbook.save("PdfResult.pdf", pdfSaveOptions);
_________________________________________________

Hi,


Thanks for providing us some details.

I think the issue might not be related to Aspose.Cells. We also recommend you to kindly try our latest version/fix: Aspose.Cells for Java v8.6.1 (you may download it from the Downloads module). Also could you remove or comment out the following lines from the code if it works fine.
e.g
Sample code:
pdfSaveOptions.setImageResample(500, 100);
pdfSaveOptions.setImageType(ImageFormat.getPng());


By the way, Aspose.Cells renders PDF file in the similar way as you do it (save the spreadsheet as “PDF” for Save as type using “Save As” dialog box) using MS Excel (manually), so you may also try to render PDF file in MS Excel manually and check if Barcode is recognized or not by your hardware?

Thank you.
As you recommended, we've tried to use Excel's "Save As". The result was perfect, our hardware did recognize the barcode.
But the result of Aspose.Cells is still unrecognizable, even if we use the latest version of Aspose.Cells.
We attached some pictures for you to see the difference between the resuls of Excel and Aspose.Cells.

PS: We've noticed the strange effect. If we zoom in the PDF file, generated by Aspose.Cells, the borders of black and white barcode elements are perfectly detectable, the picture on the screen looks great. But the printed version is disappointing.
It seems, that the picture was resampled while beeing printed on paper.

Hi,


Thanks for the sample files.

I also requested you to kindly remove or comment out the following two lines from your code segment if it makes any difference:
e.g
Sample code:
pdfSaveOptions.setImageResample(500, 100);
pdfSaveOptions.setImageType(ImageFormat.getPng());

Let us know if you still have any issue.

Thank you.

These changes had some effect. The result seemed better, after we commented the code you marked. But there are still dirty places. I marked it on the picture by the red circle.


Draw your attention, please, all problems can be seen only on the paper. Electronic version of the barcode is pretty.

Hi Vladimir,


Thank you for the clarification.

We have performed a few tests on our side while using the latest version of Aspose.Cells for Java 8.6.1.2 to generate the PDF from your provided spreadsheet, and then printed it with a laser printer to compare the results against the print of Excel generated PDF. We are able to notice a few differences in the barcode image when compared the two aforementioned print outs. Moreover, the print taken from the PDF generated with Aspose.Cells for .NET API looks much better than the one generated with Aspose.Cells for Java. Based on these observations, we have logged an investigative ticket with Id CELLSJAVA-41556 in our bug tracking system. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.
Hello, dear colleagues!
Are there any suggestions about the terms of resolving this issue?
Our customers looking forward new functionality, that we would like to develop using Aspose.Cells.

LOIS team.

Hi again,


As we have just noticed the problem and have logged it for further investigation so it will take some time. Please let us complete the analysis phase then we will be in a better position to commit an ETA for the fix.

Hi,


This is to inform you that we have fixed your issue logged earlier as “CELLSJAVA-41556” now. We will soon provide the fix after performing QA and incorporating other enhancements and fixes.

Once the fix is available for public use, we will let you know here.

Thank you.

Hi,

Thanks for using Aspose.Cells.

Please download and try the fix: Aspose.Cells
for Java v8.6.1.4
and let us know your feedback.

Thanks, it works fine!)


LOIS team.

Hi,

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.

The issues you have found earlier (filed as CELLSJAVA-41556) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.