[PXCE 11.0.1] According to the API, util.readFileIntoStream() should return a readstream object that I can get hex encoded string from its read() method. I've tried the following, that does return chunks from Acrobat, but from PXCE the object returns nothing.
Is the only way to get the whole string with util.stringFromStream()? Is there a better way to do this?
Code: Select all
function parseFile(path) {
var stream = util.readFileIntoStream(path);
var chunk;
console.show();
while (chunk = stream.read(1000)) {
console.println("Chunk: " + chunk.length);
}
}
parseFile(this.path)
I've also tried Collab.documentToStream(doc) and also with that, I can only get the whole lot as a string in one go with util.stringFromStream()