I need to convert pdf to byte array and vice versa.
Can any one help me?
This is how I am converting to byte array
public static byte[] conve
PDFs may contain binary data and chances are it's getting mangled when you do ToString. It seems to me that you want this:
FileInputStream inputStream = new FileInputStream(sourcePath);
int numberBytes = inputStream .available();
byte bytearray[] = new byte[numberBytes];
inputStream .read(bytearray);