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);
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.
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?
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.
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.
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.
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.
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.
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.