Reading a PDF file as a String and creating another pdf file
807603Dec 18 2007 — edited Dec 25 2007Hi,
I have a program that reads a pdf file and converts it into a string. i am supposed to write this string as a pdf file in another location.
When i write it, the file is not getting copied completely, most of the contents are missing. Please help me how to solve this problem.
I am using a FileInputStream to read the contents as bytes and convert it into a string and converting this string as bytes and writing it to a pdf file using FileOutputStream.
If i don't convert the bytes to string and directly write it to a pdf file, it works correctly. But i have a requirement to convert it to string to pass it to the server and store it as a pdf file in a location.
Thanks,
cmbl