In Emacs 27, doc-view doesn’t to image rescaling if imagemagick is not present. However, since we have native image rescaling now, we want to rescale regardless of imagemagick. I also added convenient centering commands to doc-view.el. Note that the patch is made on Emacs master branch. Yuan In GNU Emacs 27.0.91 (build 1, x86_64-apple-darwin19.5.0, NS appkit-1894.50 Version 10.15.5 (Build 19F101)) of 2020-07-07 built on missSilver Windowing system distributor 'Apple', version 10.3.1894 System Description: Mac OS X 10.15.5 Recent messages: Auto-saving...done Mark set previous-line: Beginning of buffer [3 times] Auto-saving...done Saving file /Users/yuan/emacs/.git/COMMIT_EDITMSG... Wrote /Users/yuan/emacs/.git/COMMIT_EDITMSG Starting new Ispell process aspell with default dictionary...done Git finished user-error: Beginning of history; no preceding item Sh finished Configured using: 'configure --with-modules --with-pdumper=yes --oldincludedir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2/ --with-ns PKG_CONFIG_PATH=/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig' Configured features: RSVG DBUS GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS XIM NS MODULES THREADS JSON PDUMPER LCMS2 Important settings: value of $LANG: en_CN.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: global-magit-file-mode: t magit-file-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t bug-reference-prog-mode: t diff-hl-mode: t desktop-save-mode: t which-function-mode: t color-outline-mode: t hi-lock-mode: t info-pretty-mode: t wucuo-mode: t yas-global-mode: t yas-minor-mode: t minibuffer-electric-default-mode: t flymake-mode: t minions-mode: t eyebrowse-mode: t savehist-mode: t global-hl-todo-mode: t hl-todo-mode: t global-highlight-parentheses-mode: t highlight-parentheses-mode: t rainbow-delimiters-mode: t electric-pair-mode: t winner-mode: t aggressive-indent-mode: t recentf-mode: t which-key-mode: t general-override-mode: t outline-minor-mode: t counsel-mode: t ivy-mode: t company-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-quote-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t hs-minor-mode: t Load-path shadows: /Users/yuan/.emacs.d/package/jsonrpc-1.0.12/jsonrpc hides /Applications/Emacs.app/Contents/Resources/lisp/jsonrpc /Users/yuan/.emacs.d/package/xref-1.0.1/xref hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/xref /Users/yuan/.emacs.d/package/project-0.5.0/project hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/project /Users/yuan/.emacs.d/package/faceup-20170925.1946/faceup hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/faceup /Users/yuan/.emacs.d/package/eldoc-1.0.0/eldoc hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/eldoc /Applications/Emacs.app/Contents/Resources/lisp/mail/metamail hides /Applications/Emacs.app/Contents/Resources/lisp/obsolete/metamail /Applications/Emacs.app/Contents/Resources/lisp/sb-image hides /Applications/Emacs.app/Contents/Resources/lisp/obsolete/sb-image Features: (shadow sort mail-extr emacsbug sendmail magit-extras magit-patch-changelog magit-patch magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode diff magit-core magit-autorevert autorevert magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils crm log-edit message rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev mail-utils gmm-utils mailheader pcvs-util with-editor async-bytecomp shell server add-log bug-reference vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs bookmark text-property-search checkdoc hideshow diff-hl vc-dir vc vc-dispatcher diff-mode company-oddmuse company-keywords company-etags etags fileloop company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb desktop frameset luna-general-config which-func cus-load agda2 jka-compr cyberpunk-theme light-theme theme-util sidebar valign htmlize cl luna-publish rss-export ox-cjk-html ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii ox-publish ox org-element avl-tree generator outline+ ghelp ghelp-eglot ghelp-helpful ghelp-builtin quanjiao commentary color-outline hi-lock info+ pause utility transform org-download org-attach org-id url-http url url-proxy url-privacy url-expand url-methods url-history mailcap url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-cookie url-domsuf url-gw nsm rmc puny async olivetti dired-x ivy-xref wucuo yasnippet minibuf-eldef eglot array filenotify jsonrpc ert pp ewoc debug flymake-proc flymake warnings url-util flycheck flyspell ispell isolate inline expand-region text-mode-expansions the-org-mode-expansions er-basic-expansions thingatpt expand-region-core expand-region-custom ws-butler minions eyebrowse savehist buffer-move windmove hl-todo highlight-parentheses rainbow-delimiters elec-pair winner aggressive-indent lisp-mnt recentf-ext recentf tree-widget wid-edit which-key general helpful imenu trace edebug backtrace info-look f dash-functional help-fns radix-tree elisp-refs s loop dash org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete org-list org-faces org-entities time-date noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs counsel xdg advice xref project dired dired-loaddefs compile comint ansi-color swiper cl-extra help-mode ivy delsel ring ivy-faces ivy-overlay colir color company pcase use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core finder-inf tex-site edmacro kmacro proof-site proof-autoloads info cowboy package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars cl-loaddefs cl-lib lunary lunary-ui easy-mmode luna-local luna-f rx seq byte-opt gv bytecomp byte-compile cconv tooltip cus-start eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 133108 66388) (symbols 48 10974 7) (strings 32 38509 14005) (string-bytes 1 1141424) (vectors 16 20975) (vector-slots 8 273883 72414) (floats 8 81 468) (intervals 56 1667 452) (buffers 1000 26))