Re: [MarkLogic Dev General] Hash of pdf

2016-11-30 Thread Norman Walsh
Geert Josten writes: > You are applying xs:string on the pdf document. Try skipping that, > just apply sha1 on the binary doc directly.. FWIW, I’m successfully getting the same MD5 from Java and MarkLogic for uploaded PDFs using code along these lines: let $data :=

Re: [MarkLogic Dev General] Hash of pdf

2016-11-30 Thread David Lee
PDF's are binary xs:string() converts to a string representation which will not be byte for byte identical to the binary -- by far. You can validate easily by returning just xs:string(fn:doc("/binary.pdf")) -->