Permalink
Browse files

Handle hex strings properly-ish (not sure if they're supposed to be

decrypted or not, and don't feel like looking it up right now).
  • Loading branch information...
1 parent 411a2b0 commit 14d751b1254e3ea8a23af3dc617cb3b78b3c1897 Jason Feng committed Nov 30, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 pdf-parse.el
View
10 pdf-parse.el
@@ -179,9 +179,13 @@ Also handles indirect object references."
(defun pdf-readhex (doc &optional oid)
(forward-char)
- (let ((start (point))
- (end (- (re-search-forward ">") 1)))
- (list 'hex (buffer-substring start end))))
+ (let* ((start (point))
+ (end (- (re-search-forward ">") 1))
+ (data (buffer-substring start end))
+ (unhexed (pdf-dehexify data)))
+ (make-pdf-str
+ :s unhexed :oid oid :doc doc
+ :decrypted (not (pdf-doc-key doc)))))
(defun pdf-dref (dict key &optional noderef noread)
"Retreive an item from a PDF dict. If the value stored

0 comments on commit 14d751b

Please sign in to comment.