0
Is it accessible Stream Object string to Object Stream in C#
Community Beginner
,
/t5/acrobat-sdk-discussions/is-it-accessible-stream-object-string-to-object-stream-in-c/td-p/11432406
Sep 14, 2020
Sep 14, 2020
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
TOPICS
Acrobat SDK and JavaScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/acrobat-sdk-discussions/is-it-accessible-stream-object-string-to-object-stream-in-c/m-p/11432512#M2429
Sep 14, 2020
Sep 14, 2020
Copy link to clipboard
Copied
This is not using Adobe products. rival products are not discussed here.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

