Function: pdf-info-normalize-page-range

pdf-info-normalize-page-range is a natively compiled function defined in pdf-info.el.

Signature

(pdf-info-normalize-page-range PAGES)

Documentation

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.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-info.el
(defun pdf-info-normalize-page-range (pages)
  "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."
  (cond
   ((natnump pages)
    (cons pages pages))
   ((null pages)
    (cons 1 0))
   ((and (natnump (car pages))
         (natnump (cdr pages)))
    pages)
   (t
    (signal 'wrong-type-argument
            (list 'pdf-info-valid-page-spec-p pages)))))