As we need to have a image file of the report in order to print on Esc-pos printers and exporting to image is not possible , we are going to export the report to pdf file located in specific directory programatically and then change it to jpg format.
I would appreciate to have a sample code for this.
If we misunderstood your query then please get back to us.
ALAlbertOctober 8, 2019 02:51 PM
No its not the same query.
This is the requirement. we have a syncfusion grid that we show customer order inside that and we have a div showing order summary. we are going to print them on Esc-pos printer . in order to print we have to prepare an image containing the div and the grid. we have an export to pdf button that user can export the grid. my question in this : how can we do export to pdf programaticaly in order to convert it to image.
If its not possible do you have other solution in mind like having html of the grid in order to convert it to image?
TSThavasianand Sankaranarayanan Syncfusion Team October 9, 2019 05:58 AM
Thanks for explaining about your requirement.
We have validated your requirement. If your requirement was to print the grid element as image you can use Print feature of the Grid which allows you print the grid element as image. If it is not possible in your case please explain about the difficulty you are facing, that will help us to provide a better solution as soon as possible.
If possible, please share the screenshot or video demo of the Grid that you need to print.
Refer the following documentations and demo links for more information.
The problem is this . As we are going to print on android device and using Esc-pos printer, using the print button will not print on android device and just prints on windows devices .We have a printer library that we have to pass the image of the report to it and it prints based on different esc-pos printers.
What we need is to get the image of the report ( grid to print ) programatically.
TSThavasianand Sankaranarayanan Syncfusion Team October 11, 2019 08:45 AM
If possible can you please create a simple HTML sample and check with ESC printer and share the sample and details with us that will helpful for us to analyze further and helps to integrate with our grid.
ALAlbertOctober 11, 2019 09:04 AM
Thanks for your answer.
As you mentioned printing on Esc-pos printers is not possible through html pages and the printer company has provided a library that gets an image file and prints it.
For that reason we are looking for a way to have an image of what is going to be printed to pass to their library.
It would be the best for us to get the image of what is going to be printed from you otherwise we need a pdf or html of that in order to convert it to image programatically.
TSThavasianand Sankaranarayanan Syncfusion Team October 15, 2019 04:28 AM
Thanks for your update.
In EJ2 Pdf Viewer sever library (ASP.NET Core and Asp.NET MVC) allows the PDF document pages to be exported as raster images. We have created a sample to export the PDF document pages as image using PDF Viewer server library and shared in the following location,
Is it possible for your team to prepare the same for React.js as we are not using asp.net.
TSThavasianand Sankaranarayanan Syncfusion Team October 21, 2019 07:25 AM
We do not have support to export the PDF document pages into images from React front end. As mentioned earlier we can export the PDF document pages into images only using our EJ2 Pdf Viewer sever library.