-
I have few Data in Jpg I want to convert into excel....I wrote code but its not working 😔....someone Help me pls....0
-
Administrator • Mar 8, 2015
Curious to know if you are actually trying to convert data available in an image (.jpg) to an excel file? If yes, please share the code you've written so far so that the experts here can help you fix it.Pooja ShreeVatsaI have few Data in Jpg I want to convert into excel....I wrote code but its not working 😔....someone Help me pls....
PS: Please create a new discussion for every new topic that you wish to discuss.Are you sure? This action cannot be undone. -
Member • Mar 8, 2015
Interesting!
I have not tried though, found below links
1. #-Link-Snipped-#
2. #-Link-Snipped-#
I will try to do this stuff once I get time, meanwhile, if anyone can pitch in with their idea, we would love to hear.Are you sure? This action cannot be undone. -
Member • Mar 8, 2015
Kaustubh KatdareCurious to know if you are actually trying to convert data available in an image (.jpg) to an excel file? If yes, please share the code you've written so far so that the experts here can help you fix it.
PS: Please create a new discussion for every new topic that you wish to discuss.
This s ma code .....Kaustubh KatdareCurious to know if you are actually trying to convert data available in an image (.jpg) to an excel file? If yes, please share the code you've written so far so that the experts here can help you fix it.
PS: Please create a new discussion for every new topic that you wish to discuss.
import java.io.FileOutputStream; import com.itextpdf.text.Document; import com.itextpdf.text.pdf.PdfWriter; import com.itextpdf.text.Image; public class ImageToPDF { public static void main(String ... args) { Document document = new Document(); String input = "c:/temp/capture.png"; // .gif & .jpg String output = "c:/temp/capture.pdf"; // png to pdf(output file) try { FileOutputStream fos = new FileOutputStream(output); PdfWriter writer = PdfWriter.getInstance(document, fos); writer.open(); document.open(); document.add(Image.getInstance(input)); document.close(); writer.close(); } catch (Exception e) { e.printStackTrace(); } } }
Are you sure? This action cannot be undone. -
Member • Mar 8, 2015
Can i Try it in Base64 String?...will i get proper output...Kaustubh KatdareCurious to know if you are actually trying to convert data available in an image (.jpg) to an excel file? If yes, please share the code you've written so far so that the experts here can help you fix it.
PS: Please create a new discussion for every new topic that you wish to discuss.Are you sure? This action cannot be undone. -
Member • Mar 9, 2015
I will suggest you following to debug this problem
1st create a simple program to create a basic PDF through Java
Below is working code
<a href="https://www.avajava.com/tutorials/lessons/how-do-i-write-to-a-pdf-file-using-itext.html" target="_blank" rel="nofollow noopener noreferrer">How do I write to a PDF file using iText? - Web Tutorials - avajava.com</a>
2: Write a Program to read data from Image, I think a simple read operation should work.
3: Then merge both program and try to understand what is going wrong at every single point
Just check if input is coming correctly or notAre you sure? This action cannot be undone. -
Member • Mar 9, 2015
Thank you soo Much for your help....I ll try this..Manish GoyalI will suggest you following to debug this problem
1st create a simple program to create a basic PDF through Java
Below is working code
<a href="https://www.avajava.com/tutorials/lessons/how-do-i-write-to-a-pdf-file-using-itext.html" target="_blank" rel="nofollow noopener noreferrer">How do I write to a PDF file using iText? - Web Tutorials - avajava.com</a>
2: Write a Program to read data from Image, I think a simple read operation should work.
3: Then merge both program and try to understand what is going wrong at every single point
Just check if input is coming correctly or notAre you sure? This action cannot be undone.