;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\210\311\312\313\314\315DD\316\307\304\317\320&\210\311\321\313\314\322DD\323\307\304\317\324\325\326\327\330!\2054\331\332\"BB&\210\311\333\313\314\334DD\335\307\304\317\336&\210\311\337\313\314\340DD\341\307\304\317\342&\210\311\343\313\314\344DD\345\307\304\317\346&\210\311\347\313\314\350DD\351\307\304\317\352&\207" [require tq cl-lib custom-declare-group pdf-info nil "Extract infos from pdf-files via a helper process." :group pdf-tools custom-declare-variable pdf-info-epdfinfo-program funcall function #[0 "\304=\203\n\305\202 \306 \203\307 !\206\n\310\311!\206A \242;\2035\307 @!\2035\211\307 @!\"\206A\211\312\313!\"\206A\312!\262)\207" [system-type load-file-name default-directory command-line-args windows-nt "epdfinfo.exe" "epdfinfo" file-name-directory #[514 "\300!\205\301\302\"!\205\302\"\207" [file-directory-p file-executable-p expand-file-name] 6 "\n\n(fn EXECUTABLE DIRECTORY)"] executable-find expand-file-name "../server"] 6] "Filename of the epdfinfo executable." :type file pdf-info-epdfinfo-error-filename #[0 "\300\207" [nil] 1] "Filename for error output of the epdfinfo executable.\n\nIf nil, discard any error messages. Useful for debugging." choice (const :tag "None" nil) append file-directory-p "/tmp/" ((const "/tmp/epdfinfo.log")) ((file)) pdf-info-log #[0 "\300\207" [nil] 1] "Whether to log the communication with the server.\n\nIf this is non-nil, all communication with the epdfinfo program\nwill be logged to the buffer \"*pdf-info-log*\"." boolean pdf-info-log-entry-max #[0 "\300\207" [512] 1] "Maximum number of characters in a single log entry.\n\nThis variable has no effect if `pdf-info-log' is nil." integer pdf-info-restart-process-p #[0 "\300\207" [ask] 1] "What to do when the epdfinfo server died.\n\nThis should be one of\nnil -- do nothing,\nt -- automatically restart it or\nask -- ask whether to restart or not.\n\nIf it is `ask', the server quits and you answer no, this variable\nis set to nil." (choice (const :tag "Do nothing" nil) (const :tag "Restart silently" t) (const :tag "Always ask" ask)) pdf-info-close-document-hook #[0 "\300\207" [nil] 1] "A hook ran after a document was closed in the server.\n\nThe hook is run in the documents buffer, if it exists. Otherwise\nin a `with-temp-buffer' form." hook] 12) #@622 If non-nil process queries asynchronously. More specifically the value should be a function of at 2 arguments (fn STATUS RESPONSE), where STATUS is either nil, for a successful query, or the symbol error. RESPONSE is either the command's response or the error message. This does not work recursive, i.e. if function wants to make another asynchronous query it has to rebind this variable. Alternatively it may be a list (FN . ARGS), in which case FN will be invoked like (apply FN STATUS RESPONSE ARGS). Also, all pdf-info functions normally returning a response return nil. This variable should only be let-bound. (defvar pdf-info-asynchronous nil (#$ . 2464)) (defconst pdf-info-pdf-date-regexp "[dD]:\\([0-9]\\{4\\}\\)\\(?:\\([0-9]\\{2\\}\\)\\(?:\\([0-9]\\{2\\}\\)\\(?:\\([0-9]\\{2\\}\\)\\(?:\\([0-9]\\{2\\}\\)\\(?:\\([0-9]\\{2\\}\\)\\)?\\)?\\)?\\)?\\)?\\(?:\\([+-Zz]\\)\\(?:\\([0-9]\\{2\\}\\)\\(?:'\\([0-9]\\{2\\}\\)\\)?\\)?\\)?") #@142 Internally used transmission-queue for the server. This variable is initially `t', telling the code starting the server, that it never ran. (defvar pdf-info--queue t (#$ . 3412)) #@28 PDF data of an empty page. (defconst pdf-info-empty-page-data "%PDF-1.0\n1 0 obj<>endobj 2 0 obj<>endobj 3 0 obj<>endobj\nxref\n0 4\n000000000065535 f\n0000000010 00000 n\n0000000053 00000 n\n0000000102 00000 n\ntrailer<>\nstartxref\n149\n%EOF" (#$ . 3598)) #@35 Return the process object or nil. (defalias 'pdf-info-process #[0 "\205\301=?\205\302!\207" [pdf-info--queue t tq-process] 2 (#$ . 3972)]) #@218 Check if the server should be working properly. Signal an error if some problem was found. Message a confirmation, if INTERACTIVE-P is non-nil and no problems were found. Returns nil. (fn &optional INTERACTIVE-P) (defalias 'pdf-info-check-epdfinfo #[256 "\211;\204\n\305\306!\210\307!\204\305\310!\210 \203' ;\203#\311 !\204'\305\312!\210\313\314!\315\316!\315\317!\315\320\321\"\322P B\323\324$\216\325\326\321\"r\211q\210\323\327\"\216\325\330\321\"\323\331\"\216r\211q\210\332\333!\210\fc\210)r\211q\210\334\333\211\333\335%\210*\266\325\330\321\"\323\336\"\216r\211q\210\337\340\341!\"c\210)r\211q\210\334\333\211\333\335%\210*\266\342\343p\333 \205\251 C&\335U\204\267\305\344\345 #\210*\210+\266\211\203\304\346\347!\210\333\207" [pdf-info-epdfinfo-program pdf-info-epdfinfo-error-filename default-directory process-environment pdf-info-empty-page-data error "pdf-info-epdfinfo-program is unset or not a string" file-executable-p "pdf-info-epdfinfo-program is not executable" file-writable-p "pdf-info-epdfinfo-error-filename should contain writable filename" expand-file-name "~/" make-temp-file "commands" "empty.pdf" "tmpdir" t "TMPDIR=" make-closure #[0 "\303\300!\203\n\304\300!\210\303\301!\203\304\301!\210\303\302!\205\305\302\306\"\207" [V0 V1 V2 file-exists-p delete-file delete-directory t] 3] generate-new-buffer " *temp*" #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] " *temp file*" #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] set-buffer-multibyte nil write-region 0 #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] format "renderpage:%s:1:100\nquit\n" pdf-info-query--escape apply call-process "Error running `%s': %s" buffer-string message "The epdfinfo program appears to be working."] 14 (#$ . 4125) "p"]) #@342 Assert a running process. If it never ran, i.e. `pdf-info-process' is t, start it unconditionally. Otherwise, if FORCE is non-nil start it, if it is not running. Else restart it with respect to the variable `pdf-info-restart-process-p', which see. If getting the process to run fails, this function throws an error. (fn &optional FORCE) (defalias 'pdf-info-process-assert-running #[256 "\306\307 !\203\310\307 !\311=\204y\307 \203\312!\210\313\211\204K\314=\204K \315=\2035\n\2045\316\317!\204K \203? \315=\203K \315=\203G\313\320\321!\210\322 \210\313\323\324\325\326\327 \205_C%r\327q\210\330 \210)\331\313\"\210\332\333\211#\210\334!*\210\207" [pdf-info--queue pdf-info-restart-process-p noninteractive process-connection-type default-directory pdf-info-epdfinfo-program processp pdf-info-process process-status run tq-close nil t ask y-or-n-p "The epdfinfo server quit, restart it ? " error "The epdfinfo server quit" pdf-info-check-epdfinfo "~" apply start-process "epdfinfo" " *epdfinfo*" erase-buffer set-process-query-on-exit-flag set-process-coding-system utf-8-unix tq-create pdf-info-epdfinfo-error-filename] 7 (#$ . 5967) "P"]) (byte-code "\300\301\302\303\304$\210\305\301\304\"\207" [ad-add-advice tq-process-buffer (bugfix nil t (advice lambda nil "Fix a bug in trunk where the wrong callback gets called." (let ((tq (ad-get-arg 0))) (if (not (equal (car (process-command (tq-process tq))) pdf-info-epdfinfo-program)) ad-do-it (let ((buffer (tq-buffer tq)) done) (when (buffer-live-p buffer) (set-buffer buffer) (while (and (not done) (> (buffer-size) 0)) (setq done t) (if (tq-queue-empty tq) (let ((buf (generate-new-buffer "*spurious*"))) (copy-to-buffer buf (point-min) (point-max)) (delete-region (point-min) (point)) (pop-to-buffer buf nil) (error "Spurious communication from process %s, see buffer %s" (process-name (tq-process tq)) (buffer-name buf))) (goto-char (point-min)) (when (re-search-forward (tq-queue-head-regexp tq) nil t) (setq done nil) (let ((answer (buffer-substring (point-min) (point))) (fn (tq-queue-head-fn tq)) (closure (tq-queue-head-closure tq))) (delete-region (point-min) (point)) (tq-queue-pop tq) (condition-case-unless-debug err (funcall fn closure answer) (error (message "Error while processing tq callback: %s" (error-message-string err)))))))))))))) around nil ad-activate] 5) #@59 Query the server using CMD and ARGS. (fn CMD &rest ARGS) (defalias 'pdf-info-query #[385 "C\302 \210\211\2429\204\211\303\242!\240\210\304\305\242B\306#\307P\310\311\"\312C\312C\312C\2060\310\313$\314\315\"\210\316 \317 %\210?\205\231\242\204\\\320\321 !\322=\203\\\323\321 \324\"\210\202E\242\204v\320\321 !\322=\204v\242\325=\204v\326\327!\210\242\204~\242\207\242\326=\203\213\326\330\242\"\207\242\331=\203\226\326\332!\207\326\333!\207" [pdf-info-asynchronous pdf-info--queue pdf-info-process-assert-running intern mapconcat pdf-info-query--escape ":" "\n" make-closure #[514 "\302\300\242\"\211\203\211A\262\242\202\303\304\305GD\"\306!\210\307\310!\203,\"\2025\311@A$)\207" [V0 pdf-info-asynchronous pdf-info-query--parse-response signal wrong-number-of-arguments (status &rest result) pdf-info-query--log nil functionp apply] 9 "\n\n(fn CLOSURE RESPONSE)"] nil #[514 "\301\240\210\300\240\210\302\303\240\207" [V0 V1 V2 t] 4 "\n\n(fn S R)"] pdf-info-query--log t tq-enqueue "^\\.\n" process-status pdf-info-process run accept-process-output 0.01 quit error "The epdfinfo server quit unexpectedly." "epdfinfo: %s" interrupted "epdfinfo: Command was interrupted" "internal error: invalid response status"] 15 (#$ . 8338)]) #@45 FIXME: This command does currently nothing. (defalias 'pdf-info-interrupt #[0 "\300\301 !\205\302\301 !\303=\205\304\301 \305\"\207" [processp pdf-info-process process-status run signal-process SIGUSR1] 3 (#$ . 9635)]) #@54 Escape ARG for transmission to the server. (fn ARG) (defalias 'pdf-info-query--escape #[257 "\211\204\300 \207r\301\302!q\210\303 \210\304\305\"c\210\306b\210m\204C\307f\310>\203*\311c\210\202=\307f\312=\203=\313\306!\210\311\314\261\210\315u\210\307u\210\202\316\306d\")\207" [string get-buffer-create " *pdf-info-query--escape*" erase-buffer format "%s" 1 nil (92 58) 92 10 delete-char 110 -1 buffer-substring-no-properties] 4 (#$ . 9864)]) #@57 Read a single record of the response in current buffer. (defalias 'pdf-info-query--read-record '(macro . #[0 "\300\207" [(let (records done (beg (point))) (while (not done) (cl-case (char-after) (92 (delete-char 1) (if (not (eq (char-after) 110)) (forward-char) (delete-char 1) (insert 10))) ((58 10) (push (buffer-substring-no-properties beg (point)) records) (forward-char) (setq beg (point) done (bolp))) (t (forward-char)))) (nreverse records))] 1 (#$ . 10324)])) #@247 Parse one epdfinfo RESPONSE to CMD. Returns a cons (STATUS . RESULT), where STATUS is one of nil for a regular response, error for an error (RESULT contains the error message) or interrupted, i.e. the command was interrupted. (fn CMD RESPONSE) (defalias 'pdf-info-query--parse-response #[514 "r\300\301!q\210\302 \210\211c\210\303b\210\304\305!\203'\306y\210\307\310`\311\312!\210\313\224S\"B\202\255\304\314!\203\237\306\211y\210\306f\315U\203@`Tf\316U\204\223\306\211`\204\210\306f\211\317\267\202\201\320\303!\210\306f\321=\204a\306u\266\202C\320\303!\210\316c\266\202C\310`\"B\262\306u\210`\262n\262\210\202C\306u\266\202C\237\266\203B\262\2021\306\322\237\"B\262\202\255\304\323!\203\252\324C\202\255\307\325B)\207" [get-buffer-create " *pdf-info-query--parse-response*" erase-buffer 1 looking-at "ERR\n" nil error buffer-substring-no-properties re-search-forward "^\\.\n" 0 "OK\n" 46 10 #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (92 79 58 108 10 108)) delete-char 110 pdf-info-query--transform-response "INT\n" interrupted "Invalid server response"] 10 (#$ . 10799)]) #@66 Transform a RESPONSE to CMD into a Lisp form. (fn CMD RESPONSE) (defalias 'pdf-info-query--transform-response #[514 "\300\267\202\312\301\207\211@@\302\232\207\303@@!\207\304\305\"\207\304\306\"\207\304\307\"\207\304\310\"\207\304\311\"\207\211@\211G\312U\203<\313@BC\207\313\211A\262\242B\314\211A\262\242B\315\211A\262\242B\316@B\317\320\211A\262\242\321\322#B\323\211A\262\242B\324\211A\262 \242B\325\211A\262\n\242B\326 \211A\262 \242B\327\n\211A\262\f\242B\257\n\207\211@@\206Y\330\207\304\331\"\207\304\332@\"\207\211@\262\333\303@!!\333\303A@!!B\207\334@!\207\304\334\"\207\304\335\"\207\336=\203\325\335@!\207\337\267\202\n\304\303@\"\207\304\303@\"\340@B\341ABD\207\342@@B\343\303@A@!B\344\303@AA@!BE\207\301\207\345=\203\211@@\207\346\267\202X\347@@!\207\301\211\203M\211@\332@!A@\350>\203:\211\302\232\262\211B\262B\262\266A\266\202\202\"\210\207\304\351\"\207\211@@\207\211\207" [#s(hash-table size 19 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (open 6 close 8 number-of-pages 14 charlayout 20 regexp-flags 25 search-string 30 search-regexp 30 outline 35 pagelinks 40 metadata 45 gettext 149 getselection 157 features 162 pagesize 168 getannot 187 editannot 187 addannot 187 getannots 192 getattachments 197)) nil "1" string-to-number mapcar #[257 "\211A@G\300U\204\301\302\303A@GC\303$\210\211A@\304H\305\306\307@\310\311#\"D\207" [1 cl--assertion-failed (= 1 (length (cadr elt))) nil 0 mapcar string-to-number split-string " " t] 8 "\n\n(fn ELT)"] #[257 "\300@!\301A@!B\207" [intern string-to-number] 4 "\n\n(fn ELT)"] #[257 "\301\302@!B\303\304\305\306A@!\3078\")B\310\311\312AAA\"BE\207" [case-fold-search page string-to-number text nil pdf-util-highlight-regexp-in-string regexp-quote 2 edges mapcar #[257 "\300\301\302\303\304#\"\207" [mapcar string-to-number split-string " " t] 7 "\n\n(fn M)"]] 7 "\n\n(fn R)"] #[257 "\300\301\211A\262\242!B\302!B\207" [depth string-to-number pdf-info-query--transform-action] 5 "\n\n(fn R)"] #[257 "\300\301\302\303\211A\262\242\304\305#\"B\306!B\207" [edges mapcar string-to-number split-string " " t pdf-info-query--transform-action] 8 "\n\n(fn R)"] 1 title author subject keywords-raw keywords split-string "[ \n ]*,[ \n ]*" t creator producer format created modified "" #[257 "\300\301\302@\303\304#\"\207" [mapcar string-to-number split-string " " t] 7 "\n\n(fn LINE)"] intern round pdf-info-query--transform-annotation pdf-info-query--transform-attachment getattachment-from-annot #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (boundingbox 219 synctex-forward-search 225 synctex-backward-search 240 delannot 264)) page edges filename line column save #s(hash-table size 7 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (renderpage 282 renderpage-text-regions 282 renderpage-highlight 282 setoptions 288 getoptions 288 pagelabels 335 ping 340)) pdf-util-munch-file (:render/printed :render/usecolors) car] 15 (#$ . 11955)]) #@58 Transform ACTION response into a Lisp form. (fn ACTION) (defalias 'pdf-info-query--transform-action #[257 "\300\211A\262\242!\301B\302\211A\262\242B\303\267\202e\304\305\211A\262\242!B\306@G\307V\2055\305\211A\262\242!BD\202n\310\211A\262\242B\304\305\211A\262\242!B\306@G\307V\205`\305\211A\262 \242!BE\202n\311\211A\262\242BCBB\207" [intern type title #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (goto-dest 25 goto-remote 58)) page string-to-number top 0 filename uri] 10 (#$ . 15014)]) #@10 (fn A) (defalias 'pdf-info-query--transform-annotation #[257 "\300\301\211\211\211AAAAAAA\203\211A\262\242\202 \302\303\304GD\"\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262 \242\305\306 !B\307\310\306\311 \312\313#\"B\314\315 !B\316\315 !B\317\306 !B\320 !B\321B\322\323 !B\257\262\f\203`\211AAAAA\203\235\211A\262\242\202\244\302\303\324GD\"\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\325!B\326!B\327!\211\205\335\306!\262B\330!\211\205\362\310\306\311\312\313#\"\262B\331\332\232B\333\323!!B\257\262\314\236A\334=\203J\211G\335U\203$\211A\262\242\202+\302\303\336GD\"\211A\262\242\242\337!B\340!B\341\332\232BE\266\225\202b\314\236A\342>\203^\343\310\344 \"BC\262\266\266 \345#\207" [#[257 "\211\300\232?\205\211\207" [""] 3 "\n\n(fn S)"] nil signal wrong-number-of-arguments (page edges type id flags color contents modified &rest rest) page string-to-number edges mapcar split-string " " t type intern id flags color contents modified pdf-info-parse-pdf-date (label subject opacity popup-edges popup-is-open created &rest rest) label subject opacity popup-edges popup-is-open "1" created text 3 (icon state is-open) icon state is-open (squiggly highlight underline strike-out) markup-edges #[257 "\300\301\302\303\304#\"\207" [mapcar string-to-number split-string " " t] 7 "\n\n(fn R)"] append] 32 (#$ . 15579)]) #@10 (fn A) (defalias 'pdf-info-query--transform-attachment #[257 "\300\211G\301U\203\211A\262\242\202\302\303\304GD\"\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\211A\262\242\242\305\306 !B\307  !B\310\f !B\311\312 !\211\313Y\205a\211\262B\314 !B\315 !B\316 !B\317 !B\257\207" [#[257 "\211\300\232?\205\211\207" [""] 3 "\n\n(fn S)"] 8 signal wrong-number-of-arguments (id filename description size modified created checksum file) id intern filename description size string-to-number 0 modified created checksum file] 21 (#$ . 17085)]) #@128 Log STRING as query/response, depending on QUERY-P. This is a no-op, if `pdf-info-log' is nil. (fn STRING &optional QUERY-P) (defalias 'pdf-info-query--log #[513 "\205Yr\302\303!q\210\304 \210d\305 \212db\210n\204\306c\210\307\310\311!\312\203(\313\202)\314# \247\203?G V\203?\315 O\316P\202@\261\210)\317!\205V\320!U\205V\321d\"\266\202)\207" [pdf-info-log pdf-info-log-entry-max get-buffer-create "*pdf-info-log*" buffer-disable-undo get-buffer-window 10 propertize format-time-string "%H:%M:%S " face font-lock-keyword-face font-lock-function-name-face 0 "...[truncated]\n" window-live-p window-point set-window-point] 8 (#$ . 17692)]) #@157 Return the PDF file corresponding to FILE-OR-BUFFER. FILE-OR-BUFFER may be nil, a PDF buffer, the name of a PDF buffer or a PDF file. (fn FILE-OR-BUFFER) (defalias 'pdf-info--normalize-file-or-buffer #[257 "\211\204p\262\303!\203J\304!\204\305\306\"\210r\211q\210\307\267\202;\310\301!\203, \202=\310\302!\205=\n\202=\311 \202=\312 \211\262\204I\305\313\314 \"\210)\211;\204X\315\316\317\303\320F\"\210\321!\203c\305\322\"\210\323!\207" [major-mode doc-view-buffer-file-name doc-view--buffer-file-name bufferp buffer-live-p error "Buffer is not live :%s" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (doc-view-mode 34 pdf-view-mode 54)) boundp pdf-view-buffer-file-name buffer-file-name "Buffer is not associated with any file :%s" buffer-name signal wrong-type-argument stringp null file-remote-p "Processing remote files not supported :%s" expand-file-name] 7 (#$ . 18360)]) #@55 The type predicate for a valid page-spec. (fn PAGES) (defalias 'pdf-info-valid-page-spec-p #[257 "\3001 \301!0\202 \210\302??\207" [(error) pdf-info-normalize-page-range nil] 3 (#$ . 19309)]) #@238 Normalize PAGES for sending to the server. PAGES may be a single page number, a cons (FIRST . LAST), or nil, which stands for all pages. The result is a cons (FIRST . LAST), where LAST may be 0 representing the final page. (fn PAGES) (defalias 'pdf-info-normalize-page-range #[257 "\300!\203\n\211B\207\211\204\301\302B\207\300@!\203!\300A!\203!\207\303\304\305D\"\207" [natnump 1 0 signal wrong-type-argument pdf-info-valid-page-spec-p] 5 (#$ . 19512)]) #@13 (fn DATE) (defalias 'pdf-info-parse-pdf-date #[257 "\211\205\256\301\"\205\256\302\303\"\302\304\"\302\305\"\302\306\"\302\307\"\302\310\"\302\311\"\302\312 \"\302\313\n\"\314\315\232\204A\316\232\203c\203L\317\320!_\262\203Y\211\321\320!_\\\262\316\232\203c\211[\262\322\203o\320!\202p\314\203|\320!\202}\314 \203\211\320\n!\202\212\314 \203\226\320\f!\202\227\303 \203\243\320!\202\244\303\320!&\266\212\207" [pdf-info-pdf-date-regexp string-match match-string 1 2 3 4 5 6 7 8 9 0 "+" "-" 3600 string-to-number 60 encode-time] 19 (#$ . 19986)]) #@552 Let-bind each VAR to QUERIES results and evaluate BODY. All queries in each QUERIES form are run by the server in the order they appear and the results collected in a list, which is bound to VAR. Then BODY is evaluated and its value becomes the final result of all queries, unless at least one of them provoked an error. In this case BODY is ignored and the error is the result. This macro handles synchronous and asynchronous calls, i.e. `pdf-info-asynchronous' is non-nil, transparently. (FN ((VAR QUERIES)...) BODY) (fn LET-FORMS &rest BODY) (defalias 'pdf-info-compose-queries '(macro . #[385 "\300\301\"\204\f\302\303\"\210\304\305\"\262\306\307!\306\310!\306\311!\306\312!\306\313!\306\314!\306\315!\306\316!\306\317!\320    \321B\n\322B\n\304\323\324\325\326\"DED\n\327\330\331\332\333\334\335BBE\336\337\340\341EDC\342BBFED\n\327\343\336\304\344\345\"\304\346\"\"\334\347\211DD\350\351BBE\352BBBBBB\353\331\354D\355F\356\346D\357D\257FEFED\257 \360\304\344\361\"\"\336\362DC\363BB\333\n\364\365\347D\366BB\367BB\353\365\347D\370BB\371BB\353\302\372EE\257D\"BB\207" [cl-every #[257 "\2119\203 \211C\262\211:\205\211@9\205\211A<\207" #1=[] 2 "\n\n(fn FORM)"] error "Invalid let-form: %s" mapcar #[257 "\2119\203\211C\207\207" #1# 2 "\n\n(fn FORM)"] make-symbol "status" "response" "first-error" "done" "callback" "results" "push-fn" "terminal-fn" "buffer" let* ((current-buffer)) (pdf-info-asynchronous) 'copy-sequence quote cl-mapcar #[257 "\211@C\207" #1# 2 "\n\n(fn FORM)"] lambda (status result var) if status unless setq (result) let elt assq var ((setcdr elt (append (cdr elt) (list result)))) (&rest _) make-closure #[257 "\211\301\302\303D\300EDD\207" [V0 cdr assq quote] 6 "\n\n(fn VAR)"] car not or with-current-buffer (t) when functionp funcall apply cdr append #[257 "\301\302\303\300\304@DEDCA@E\207" [V0 let pdf-info-asynchronous list quote] 7 "\n\n(fn FORM)"] pdf-info-asynchronous ((pdf-info-ping)) while and ((eq (process-status (pdf-info-process)) 'run)) ((accept-process-output (pdf-info-process) 0.01)) ((not (eq (process-status (pdf-info-process)) 'run))) ((error "The epdfinfo server quit unexpectedly.")) "epdfinfo: %s"] 37 (#$ . 20602)])) (byte-code "\300\301\302\303#\304\301\305\306#\210\304\307\310\311#\207" [function-put pdf-info-compose-queries lisp-indent-function 1 put edebug-form-spec ((&rest &or (symbolp &optional form) symbolp) body) pdf-info--queue permanent-local t] 5) #@218 Create a server instance local to BUFFER. Does nothing if BUFFER already has a local instance. Unless FORCE-RESTART-P is non-nil, then quit a potential process and restart it. (fn &optional BUFFER FORCE-RESTART-P) (defalias 'pdf-info-make-local-server #[512 "\204p\262rq\210\211?\205#\301\300!\205#\302\303 !\205#\304\303 !\305=?\205J\301\300!\2038\302\303 !\2038\306!\210\307\300!\210\310\311\312!\210\313\314\315\310\312$\210)\207" [pdf-info--queue local-variable-p processp pdf-info-process process-status run tq-close make-local-variable nil pdf-info-process-assert-running t add-hook kill-buffer-hook pdf-info-kill-local-server] 7 (#$ . 23118)]) #@110 Kill the local server in BUFFER. A No-op, if BUFFER has not running server instance. (fn &optional BUFFER) (defalias 'pdf-info-kill-local-server #[256 "r\211\203\211q\210\300\301!\205\302 \210\303\301!\210\304)\207" [local-variable-p pdf-info--queue pdf-info-kill kill-local-variable t] 3 (#$ . 23793)]) #@81 Return non-nil, if BUFFER has a running server instance. (fn &optional BUFFER) (defalias 'pdf-info-local-server-p #[256 "\211\204p\262\300!\262\301!\205\302\303\"\207" [get-buffer buffer-live-p local-variable-p pdf-info--queue] 4 (#$ . 24109)]) #@109 Process a set of queries asynchronously in a local instance. (fn PRODUCER-FN CONSUMER-FN SENTINEL-FN ARGS) (defalias 'pdf-info-local-batch-query #[1028 "\300 \204 \301\302!\210p\303\304!\303\305!\306\307%\306\310%M\210M\210!\207" [pdf-info-local-server-p error "Create a local server first" make-symbol "producer" "consumer" make-closure #[257 "\211\204 \301\305\302\"\207\306\303K\"\307\302!\203\"r\302q\210\310\300@\")\202&\301\311\302\")\207" [V0 V1 V2 V3 pdf-info-asynchronous finished apply-partially pdf-info-local-server-p apply error] 4 "\n\n(fn ARGS)"] #[771 "\304\302!\204 \301\305\302\"\207r\302q\210\306\300@$\210)\303KA!\207" [V0 V1 V2 V3 pdf-info-local-server-p error apply] 8 "\n\n(fn ARGS STATUS RESULT)"]] 14 (#$ . 24371)]) (defvar pdf-info-features nil) #@60 Return a list of symbols describing compile-time features. (defalias 'pdf-info-features #[0 "\206\f\302\303\304!)\211\207" [pdf-info-features pdf-info-asynchronous nil pdf-info-query features] 2 (#$ . 25185)]) (defalias 'pdf-info-writable-annotations-p #[0 "\300\301 >??\207" [writable-annotations pdf-info-features] 2]) (defalias 'pdf-info-markup-annotations-p #[0 "\300\301 >??\207" [markup-annotations pdf-info-features] 2]) (defalias 'pdf-info-assert-writable-annotations '(macro . #[0 "\300\207" [(unless (memq 'writable-annotations (pdf-info-features)) (error "Writing annotations is not supported by this version of epdfinfo"))] 1])) (defalias 'pdf-info-assert-markup-annotations '(macro . #[0 "\300\207" [(unless (memq 'markup-annotations (pdf-info-features)) (error "Creating markup annotations is not supported by this version of epdfinfo"))] 1])) (defalias 'pdf-info-creatable-annotation-types #[0 "\300 \301>\204\n\302\207\303>\203\304\305\306\307\310\257\207\304C\207" [pdf-info-features writable-annotations nil markup-annotations text squiggly underline strike-out highlight] 6]) #@295 Open the document FILE-OR-BUFFER using PASSWORD. Generally, documents are opened and closed automatically on demand, so this function is rarely needed, unless a PASSWORD is set on the document. Manually opened documents are never closed automatically. (fn &optional FILE-OR-BUFFER PASSWORD) (defalias 'pdf-info-open #[512 "\300\301\302!#\207" [pdf-info-query open pdf-info--normalize-file-or-buffer] 6 (#$ . 26297)]) #@186 Close the document FILE-OR-BUFFER. Returns t, if the document was actually open, otherwise nil. This command is rarely needed, see also `pdf-info-open'. (fn &optional FILE-OR-BUFFER) (defalias 'pdf-info-close #[256 "\300!\301!\302\303\"\304!\203rq\210\305\306!\210)\207\307\310\311\"r\211q\210\312\313\"\216\305\306!\210*\210\207" [pdf-info--normalize-file-or-buffer find-buffer-visiting pdf-info-query close buffer-live-p run-hooks pdf-info-close-document-hook generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2]] 8 (#$ . 26726)]) #@204 Return non-nil if FILE-OR-BUFFER requires a password. Note: This function returns nil, if the document is encrypted, but was already opened (presumably using a password). (fn &optional FILE-OR-BUFFER) (defalias 'pdf-info-encrypted-p #[256 "\3011 \302\303!!0\207\304A@\305\306\307#)\266\203\206#\310@A\"\207" [inhibit-changing-match-data (error) pdf-info-open pdf-info--normalize-file-or-buffer ":Document is encrypted\\'" nil t string-match signal] 9 (#$ . 27335)]) #@158 Extract the metadata from the document FILE-OR-BUFFER. This returns an alist containing some information about the document. (fn &optional FILE-OR-BUFFER) (defalias 'pdf-info-metadata #[256 "\300\301\302!\"\207" [pdf-info-query metadata pdf-info--normalize-file-or-buffer] 5 (#$ . 27820)]) #@678 Search for STRING in PAGES of document FILE-OR-BUFFER. See `pdf-info-normalize-page-range' for valid PAGES formats. This function returns a list of matches. Each item is an alist containing keys PAGE, TEXT and EDGES, where PAGE and TEXT are the matched page resp. line. EDGES is a list containing a single edges element (LEFT TOP RIGHT BOTTOM). This is for consistency with `pdf-info-search-regexp', which may return matches with multiple edges. The TEXT contains `match' face properties on the matched parts. Search is case-insensitive, unless `case-fold-search' is nil and searching case-sensitive is supported by the server. (fn STRING &optional PAGES FILE-OR-BUFFER) (defalias 'pdf-info-search-string #[769 "\301!\302\303\304!@A\203\305\202\306&\207" [case-fold-search pdf-info-normalize-page-range pdf-info-query search-string pdf-info--normalize-file-or-buffer 1 0] 11 (#$ . 28120)]) #@70 PCRE compile flags. Don't use this, but the equally named function. (defvar pdf-info-regexp-compile-flags nil (#$ . 29034)) #@68 PCRE match flags. Don't use this, but the equally named function. (defvar pdf-info-regexp-match-flags nil (#$ . 29165)) (defalias 'pdf-info-regexp-compile-flags #[0 "\206\303\304\305!\306\307\"\310\"\211)\266\203\207" [pdf-info-regexp-compile-flags pdf-info-asynchronous pdf-info-regexp-match-flags nil pdf-info-query regexp-flags cl-remove-if-not #[257 "\301\302@!\303\304\305#)\207" [inhibit-changing-match-data "\\`match-" symbol-name nil t string-match] 8 "\n\n(fn FLAG)"] cl-set-difference] 5]) (defalias 'pdf-info-regexp-match-flags #[0 "\206\301 \210\207" [pdf-info-regexp-match-flags pdf-info-regexp-compile-flags] 1]) #@852 Compile- and match-flags for the PCRE engine. This is a list of symbols denoting compile- and match-flags when searching for regular expressions. You should not change this directly, but rather `let'-bind it around a call to `pdf-info-search-regexp'. Valid compile-flags are: newline-crlf, newline-lf, newline-cr, dupnames, optimize, no-auto-capture, raw, ungreedy, dollar-endonly, anchored, extended, dotall, multiline and caseless. Note that the last one, caseless, is handled special, as it is always added if `case-fold-search' is non-nil. And valid match-flags: match-anchored, match-notbol, match-noteol, match-notempty, match-partial, match-newline-cr, match-newline-lf, match-newline-crlf and match-newline-any. See the glib documentation at url `https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html'. (defvar pdf-info-regexp-flags '(multiline) (#$ . 29820)) #@516 Search for a PCRE on PAGES of document FILE-OR-BUFFER. See `pdf-info-normalize-page-range' for valid PAGES formats and `pdf-info-search-string' for its return value. Uses the flags in `pdf-info-regexp-flags', which see. If `case-fold-search' is non-nil, the caseless flag is added. If NO-ERROR is non-nil, catch errors due to invalid regexps and return nil. If it is the symbol `invalid-regexp', then re-signal this kind of error as a `invalid-regexp' error. (fn PCRE &optional PAGES NO-ERROR FILE-OR-BUFFER) (defalias 'pdf-info-search-regexp #[1025 "\302\303!\3041)\305\306\307!@A\n\205\310 B\311 \" \312 \"&0\207\203<\313\314\315\316\n!\"A@\"\204C\317@A\"\207\320=\205S\317\320\321\322A@\"C\"\207" [case-fold-search pdf-info-regexp-flags #[514 "\300\301\302\"\303B\"\207" [cl-reduce make-closure #[514 "\211\300\236A\211\203 \301\"\207\207" [V0 logior] 6 "\n\n(fn V FLAG)"] 0] 6 "\n\n(fn FLAGS ALIST)"] pdf-info-normalize-page-range (error) pdf-info-query search-regexp pdf-info--normalize-file-or-buffer caseless pdf-info-regexp-compile-flags pdf-info-regexp-match-flags string-match format "\\`epdfinfo: *Invalid *regexp: *\\(?:Error while compiling regular expression *%s *\\)?\\(.*\\)" regexp-quote signal invalid-regexp match-string 1] 16 (#$ . 30735)]) #@777 Return a list of links on PAGE in document FILE-OR-BUFFER. This function returns a list of alists with the following keys. EDGES represents the relative bounding-box of the link , TYPE is the type of the action, TITLE is a, possibly empty, name for this action. TYPE may be one of goto-dest -- This is a internal link to some page. Each element contains additional keys PAGE and TOP, where PAGE is the page of the link and TOP its vertical position. goto-remote -- This a external link to some document. Same as goto-dest, with an additional FILENAME of the external PDF. uri -- A link in form of some URI. Alist contains additional key URI. In the first two cases, PAGE may be 0 and TOP nil, which means these data is unspecified. (fn PAGE &optional FILE-OR-BUFFER) (defalias 'pdf-info-pagelinks #[513 "\300!\204\301\302\303\304E\"\210\305\306\307!#\207" [natnump signal wrong-type-argument natnum page pdf-info-query pagelinks pdf-info--normalize-file-or-buffer] 7 (#$ . 32039)]) #@87 Return the number of pages in document FILE-OR-BUFFER. (fn &optional FILE-OR-BUFFER) (defalias 'pdf-info-number-of-pages #[256 "\300\301\302!\"\207" [pdf-info-query number-of-pages pdf-info--normalize-file-or-buffer] 5 (#$ . 33042)]) #@244 Return the PDF outline of document FILE-OR-BUFFER. This function returns a list of alists like `pdf-info-pagelinks'. Additionally every alist has a DEPTH (>= 1) entry with the depth of this element in the tree. (fn &optional FILE-OR-BUFFER) (defalias 'pdf-info-outline #[256 "\300\301\302!\"\207" [pdf-info-query outline pdf-info--normalize-file-or-buffer] 5 (#$ . 33285)]) #@378 Get text on PAGE according to EDGES. EDGES should contain relative coordinates. The selection may extend over multiple lines, which works similar to a Emacs region. SELECTION-STYLE may be one of glyph, word or line and determines the smallest unit of the selected region. Return the text contained in the selection. (fn PAGE EDGES &optional SELECTION-STYLE FILE-OR-BUFFER) (defalias 'pdf-info-gettext #[1026 "\300\301\302!\303\304\305#\306\267\202 \307\202!\310\202!\311\202!\307%\207" [pdf-info-query gettext pdf-info--normalize-file-or-buffer mapconcat number-to-string " " #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (glyph 20 word 24 line 28)) 0 1 2] 12 (#$ . 33669)]) #@301 Return the edges of the selection EDGES on PAGE. Arguments are the same as for `pdf-info-gettext'. Return a list of edges corresponding to the text that would be returned by the aforementioned function, when called with the same arguments. (fn PAGE EDGES &optional SELECTION-STYLE FILE-OR-BUFFER) (defalias 'pdf-info-getselection #[1026 "\300\301\302!\303\304\305#\306\267\202 \307\202!\310\202!\311\202!\307%\207" [pdf-info-query getselection pdf-info--normalize-file-or-buffer mapconcat number-to-string " " #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (glyph 20 word 24 line 28)) 0 1 2] 12 (#$ . 34405)]) #@91 Return a list of edges describing PAGE's text-layout. (fn PAGE &optional FILE-OR-BUFFER) (defalias 'pdf-info-textregions #[513 "\300\301\302$\207" [pdf-info-getselection (0 0 1 1) glyph] 7 (#$ . 35073)]) #@511 Return the layout of characters of PAGE in/at EDGES-OR-POS. Returns a list of elements (CHAR . (LEFT TOP RIGHT BOT)) mapping character to their corresponding relative bounding-boxes. EDGES-OR-POS may be a region (LEFT TOP RIGHT BOT) restricting the returned value to include only characters fully contained in it. Or a cons (LEFT . TOP) which means to only include the character at this position. In this case the return value contains at most one element. (fn PAGE &optional EDGES-OR-POS FILE-OR-BUFFER) (defalias 'pdf-info-charlayout #[769 "\204\300\262A\247\203@A\301\211F\262\302\303\304!\305\306\307#$\207" [(0 0 1 1) -1 pdf-info-query charlayout pdf-info--normalize-file-or-buffer mapconcat number-to-string " "] 11 (#$ . 35287)]) #@116 Return the size of PAGE as a cons (WIDTH . HEIGHT) The size is in PDF points. (fn PAGE &optional FILE-OR-BUFFER) (defalias 'pdf-info-pagesize #[513 "\300\301\302!#\207" [pdf-info-query pagesize pdf-info--normalize-file-or-buffer] 6 (#$ . 36050)]) #@43 Return non-nil, if the server is running. (defalias 'pdf-info-running-p #[0 "\300\301 !\205 \302\301 !\303=\207" [processp pdf-info-process process-status run] 2 (#$ . 36307)]) #@210 Quit the epdfinfo server. This blocks until all outstanding requests are answered. Unless TIMEOUT is non-nil, in which case we wait at most TIMEOUT seconds before killing the server. (fn &optional TIMEOUT) (defalias 'pdf-info-quit #[256 "\211\203\211\247\204\302\303\304\305E\"\210\306 \203H\211\203\307\202\310\311!\210\211\203G\312 \313]\\\262\306 \203G\211\312 V\203G\314\315 \316\317\320$\210\2020)\321\315 !\203S\322 !\210\317\211\207" [pdf-info-asynchronous pdf-info--queue signal wrong-type-argument (or null number) timeout pdf-info-running-p #[128 "\300\207" [nil] 2 "\n\n(fn &rest _)"] pdf-info-query quit float-time 0 accept-process-output pdf-info-process 0.5 nil t processp tq-close] 6 (#$ . 36492)]) #@134 Kill the epdfinfo server. Immediately delete the server process, see also `pdf-info-quit', for a more sane way to exit the program. (defalias 'pdf-info-kill #[0 "\301\302 !\203 \303!\210\304\211\207" [pdf-info--queue processp pdf-info-process tq-close nil] 2 (#$ . 37236)]) #@1251 Return the annotations on PAGE. See `pdf-info-normalize-page-range' for valid PAGES formats. This function returns the annotations for PAGES as a list of alists. Each element of this list describes one annotation and contains the following keys. page - Its page number. edges - Its area. type - A symbol describing the annotation's type. id - A document-wide unique symbol referencing this annotation. flags - Its flags, binary encoded. color - Its color in standard Emacs notation. contents - The text of this annotation. modified - The last modification date of this annotation. Additionally, if the annotation is a markup annotation, the following keys are present. label - The annotation's label. subject - The subject addressed. opacity - The level of relative opacity. popup-edges - The edges of a associated popup window or nil. popup-is-open - Whether this window should be displayed open. created - The date this markup annotation was created. If the annotation is also a markup text annotation, the alist contains the following keys. text-icon - A string describing the purpose of this annotation. text-state - A string, e.g. accepted or rejected. (fn &optional PAGES FILE-OR-BUFFER) (defalias 'pdf-info-getannots #[512 "\300!\301\302\303!@A$\207" [pdf-info-normalize-page-range pdf-info-query getannots pdf-info--normalize-file-or-buffer] 8 (#$ . 37522)]) #@286 Return the annotation for ID. ID should be a symbol, which was previously returned in a `pdf-info-getannots' query. Signal an error, if an annotation with ID is not available. See `pdf-info-getannots' for the kind of return value of this function. (fn ID &optional FILE-OR-BUFFER) (defalias 'pdf-info-getannot #[513 "\300\301\302!#\207" [pdf-info-query getannot pdf-info--normalize-file-or-buffer] 6 (#$ . 38956)]) #@265 Add a new annotation to PAGE with EDGES of TYPE. FIXME: TYPE may be one of `text', `markup-highlight', ... . FIXME: -1 = 24 See `pdf-info-getannots' for the kind of value of this function returns. (fn PAGE EDGES TYPE &optional FILE-OR-BUFFER &rest MARKUP-EDGES) (defalias 'pdf-info-addannot #[1155 "\300\301 >\204 \302\303!\210:\203B\262\304\262\305\306\307\310!\311\312 \313#\314\315 \"&\207" [writable-annotations pdf-info-features error "Writing annotations is not supported by this version of epdfinfo" nil apply pdf-info-query addannot pdf-info--normalize-file-or-buffer mapconcat number-to-string " " mapcar #[257 "\300\301\302#\207" [mapconcat number-to-string " "] 5 "\n\n(fn ME)"]] 15 (#$ . 39384)]) #@222 Delete the annotation with ID in FILE-OR-BUFFER. ID should be a symbol, which was previously returned in a `pdf-info-getannots' query. Signal an error, if annotation ID does not exist. (fn ID &optional FILE-OR-BUFFER) (defalias 'pdf-info-delannot #[513 "\300\301 >\204 \302\303!\210\304\305\306!#\207" [writable-annotations pdf-info-features error "Writing annotations is not supported by this version of epdfinfo" pdf-info-query delannot pdf-info--normalize-file-or-buffer] 6 (#$ . 40119)]) #@349 Move/Resize annotation ID to fit EDGES. ID should be a symbol, which was previously returned in a `pdf-info-getannots' query. Signal an error, if annotation ID does not exist. EDGES should be a list (LEFT TOP RIGHT BOT). RIGHT and/or BOT may also be negative, which means to keep the width resp. height. (fn ID EDGES &optional FILE-OR-BUFFER) (defalias 'pdf-info-mvannot #[770 "\300\301BC#\207" [pdf-info-editannot edges] 7 (#$ . 40624)]) #@308 Edit annotation ID, applying MODIFICATIONS. ID should be a symbol, which was previously returned in a `pdf-info-getannots' query. MODIFICATIONS is an alist of properties and their new values. The server must support modifying annotations for this to work. (fn ID MODIFICATIONS &optional FILE-OR-BUFFER) (defalias 'pdf-info-editannot #[770 "\300\301 >\204 \302\303!\210\304\305\"\306\307\310\311!\306\312\"%\207" [writable-annotations pdf-info-features error "Writing annotations is not supported by this version of epdfinfo" mapcar #[257 "\211@\211\300\267\202(@\301A!D\207@\302\303A\304#D\207@A\203%\305\202&\306D\207@AD\207" [#s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (color 8 edges 16 popup-is-open 26 is-open 26)) pdf-util-hexcolor mapconcat number-to-string " " 1 0] 7 "\n\n(fn ELT)"] apply pdf-info-query editannot pdf-info--normalize-file-or-buffer append] 12 (#$ . 41078)]) #@146 Save FILE-OR-BUFFER. This saves the document to a new temporary file, which is returned and owned by the caller. (fn &optional FILE-OR-BUFFER) (defalias 'pdf-info-save #[256 "\300\301 >\204 \302\303!\210\304\305\306!\"\207" [writable-annotations pdf-info-features error "Writing annotations is not supported by this version of epdfinfo" pdf-info-query save pdf-info--normalize-file-or-buffer] 5 (#$ . 42032)]) #@365 Return the attachment associated with annotation ID. ID should be a symbol which was previously returned in a `pdf-info-getannots' query, and referencing an attachment of type `file', otherwise an error is signaled. See `pdf-info-getattachments' for the kind of return value of this function and the meaning of DO-SAVE. (fn ID &optional DO-SAVE FILE-OR-BUFFER) (defalias 'pdf-info-getattachment-from-annot #[769 "\300\301\302!\203\303\202\304$\207" [pdf-info-query getattachment-from-annot pdf-info--normalize-file-or-buffer 1 0] 8 (#$ . 42453)]) #@773 Return all document level attachments. If DO-SAVE is non-nil, save the attachments data to a local file, which is then owned by the caller, see below. This function returns a list of alists, where every element contains the following keys. All values, except for id, may be nil, i.e. not present. id - A symbol uniquely identifying this attachment. filename - The filename of this attachment. description - A description of this attachment. size - The size in bytes. modified - The last modification date. created - The date of creation. checksum - A MD5 checksum of this attachment's data. file - The name of a tempfile containing the data (only present if DO-SAVE is non-nil). (fn &optional DO-SAVE FILE-OR-BUFFER) (defalias 'pdf-info-getattachments #[512 "\300\301\302!\203 \303\202\304#\207" [pdf-info-query getattachments pdf-info--normalize-file-or-buffer 1 0] 6 (#$ . 43017)]) #@430 Perform a forward search with synctex. SOURCE should be a LaTeX buffer or the absolute filename of a corresponding file. LINE and COLUMN represent the position in the buffer or file. Finally FILE-OR-BUFFER corresponds to the PDF document. Returns an alist with entries PAGE and relative EDGES describing the position in the PDF document corresponding to the SOURCE location. (fn SOURCE &optional LINE COLUMN FILE-OR-BUFFER) (defalias 'pdf-info-synctex-forward-search #[1025 "\300\301!!\203\302\301!!\202\303\304\305!\206\306\206#\306%\207" [buffer-live-p get-buffer buffer-file-name pdf-info-query synctex-forward-search pdf-info--normalize-file-or-buffer 1] 11 (#$ . 43968)]) #@233 Perform a backward search with synctex. Find the source location corresponding to the coordinates (X . Y) on PAGE in FILE-OR-BUFFER. Returns an alist with entries FILENAME, LINE and COLUMN. (fn PAGE &optional X Y FILE-OR-BUFFER) (defalias 'pdf-info-synctex-backward-search #[1025 "\300\301\302!\206 \303\206\303%\207" [pdf-info-query synctex-backward-search pdf-info--normalize-file-or-buffer 0] 10 (#$ . 44673)]) #@137 Render PAGE with width WIDTH. Return the data of the corresponding PNG image. (fn PAGE WIDTH &optional FILE-OR-BUFFER &rest COMMANDS) (defalias 'pdf-info-renderpage #[898 "\300!\203B\262\301\262\302\303\304\305!\301A\203W\211A\262 \242\211A\262\n\242\306\267\202G\307\310\311#\202H\312!\202H\310!\202H\211\262B\262\211B\266\203\202\203c\313\314 @\"\210\211\237\262&\207" [keywordp nil apply pdf-info-query renderpage pdf-info--normalize-file-or-buffer #s(hash-table size 7 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:crop-to 51 :highlight-line 51 :highlight-region 51 :highlight-text 51 :foreground 59 :background 59 :alpha 65)) mapconcat number-to-string " " pdf-util-hexcolor error "Keyword is missing a value: %s"] 17 (#$ . 45107)]) #@605 Highlight text on PAGE with width WIDTH using REGIONS. REGIONS is a list determining foreground and background color and the regions to render. So each element should look like (FG BG (LEFT TOP RIGHT BOT) (LEFT TOP RIGHT BOT) ... ) . The rendering is text-aware. If SINGLE-LINE-P is non-nil, the edges in REGIONS are each supposed to be limited to a single line in the document. Setting this, if applicable, avoids rendering problems. For the other args see `pdf-info-renderpage'. Return the data of the corresponding PNG image. (fn PAGE WIDTH SINGLE-LINE-P &optional FILE-OR-BUFFER &rest REGIONS) (defalias 'pdf-info-renderpage-text-regions #[1155 ":\203 B\262\300\262\301\302\301\303\304\305\306\f\" \"\"%\207" [nil apply pdf-info-renderpage append mapcar make-closure #[257 "\301\211A\262\242\302\211A\262\242\303\304\305\300\"\"BBBB\207" [V0 :foreground :background cl-mapcan make-closure #[257 "\300\203\301\202 \302D\207" [V0 :highlight-line :highlight-text] 3 "\n\n(fn EDGES)"]] 9 "\n\n(fn ELT)"]] 16 (#$ . 45914)]) #@419 Highlight regions on PAGE with width WIDTH using REGIONS. REGIONS is a list determining the background color, a alpha value and the regions to render. So each element should look like (FILL-COLOR STROKE-COLOR ALPHA (LEFT TOP RIGHT BOT) (LEFT TOP RIGHT BOT) ... ) . For the other args see `pdf-info-renderpage'. Return the data of the corresponding PNG image. (fn PAGE WIDTH &optional FILE-OR-BUFFER &rest REGIONS) (defalias 'pdf-info-renderpage-highlight #[898 ":\203 B\262\300\262\301\302\301\303\304\305 \"\"%\207" [nil apply pdf-info-renderpage append mapcar #[257 "\300\211A\262\242\301\211A\262\242\302\211A\262\242\303\304\"BBBBBB\207" [:background :foreground :alpha cl-mapcan #[257 "\300D\207" [:highlight-region] 3 "\n\n(fn EDGES)"]] 10 "\n\n(fn ELT)"]] 14 (#$ . 46973)]) #@107 Return a bounding-box for PAGE. Returns a list (LEFT TOP RIGHT BOT). (fn PAGE &optional FILE-OR-BUFFER) (defalias 'pdf-info-boundingbox #[513 "\300\301\302!#\207" [pdf-info-query boundingbox pdf-info--normalize-file-or-buffer] 6 (#$ . 47784)]) #@33 (fn &optional FILE-OR-BUFFER) (defalias 'pdf-info-getoptions #[256 "\300\301\302!\"\207" [pdf-info-query getoptions pdf-info--normalize-file-or-buffer] 5 (#$ . 48038)]) #@47 (fn &optional FILE-OR-BUFFER &rest OPTIONS) (defalias 'pdf-info-setoptions #[384 "9\203 B\262\300\262\211G\301\246\302U\204\303\304!\210\305\306\307\310!\300\203p\211A\262\242\211A\262\242\311!\203>\312=\203C\303\313\"\210\314\267\202c\315!B\262\202h\211\203[\316\202\\\302B\262\202h\211B\262B\266\203\202!\211\262$\207" [nil 2 0 error "Missing a option value" apply pdf-info-query setoptions pdf-info--normalize-file-or-buffer keywordp : "Keyword expected: %s" #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:render/foreground 73 :render/background 73 :render/usecolors 83 :render/printed 83)) pdf-util-hexcolor 1] 12 (#$ . 48216)]) #@148 Return a list of pagelabels. Returns a list of strings corresponding to the labels of the pages in FILE-OR-BUFFER. (fn &optional FILE-OR-BUFFER) (defalias 'pdf-info-pagelabels #[256 "\300\301\302!\"\207" [pdf-info-query pagelabels pdf-info--normalize-file-or-buffer] 5 (#$ . 48936)]) #@100 Ping the server using MESSAGE. Returns MESSAGE, which defaults to "pong". (fn &optional MESSAGE) (defalias 'pdf-info-ping #[256 "\300\301\206\302\"\207" [pdf-info-query ping "pong"] 4 (#$ . 49230)]) (provide 'pdf-info)