Copy link to clipboard
Copied
I'm using Java Script to convert Image to string and store in the field value. As we can see the below Javascript:
// Getting the Object var oFile = this.getDataObjectContents("Test1"); //object into the string var cFile = util.stringFromStream(oFile, "utf-8"); // storing in the field this.getField("Text2").value = cFile;
I'm reading all the field On the pdf and I'm able to get the field Value, but when I'm trying to write it, in the Server/Local machine I'm not able to write the image. I'm using the below code.
byte[] br; // (cc.Value)// value of the fieldbr = Encoding.ASCII.GetBytes(cc.Value); //br= imgToByteArray byte[] pdfdata = Encoding.ASCII.GetBytes(cc.Value); Stream streamed = new MemoryStream(pdfdata); Stream InputStream = streamed; byte[] result; using (var streamReaderWE = new MemoryStream()) { InputStream.CopyTo(streamReaderWE); result = streamReaderWE.ToArray(); File.WriteAllBytes(fileNameEEEE, result); }
Thanks
Copy link to clipboard
Copied
This is not using Adobe products. rival products are not discussed here.