0

I am using pdftools with AUCTEX so that I can display output within emacs. I am using a windows system with emacs 25.3. However after compilation I get the following:

%PDF-1.5
%    
3 0 obj
<<
/Length 2521      
/Filter /FlateDecode
>>
stream
xڭYY 7~ _!`_Z      }k{ q6# 8g k {҇' ۷ E !5 y & W     n  {-ŪH Ld     :  * * ,_  W       *L   ǟ     " > ӏ ֟o }   U 9   F   )RcL b-Y q   ͛? 7R    +j< ~kQ$ 7   t   3X )g  HMg    <  N   "š C    )  FC]Mߺk  k  M ؔ d 

Also when I start emacs I get the following message:

need to build the epdfinfo program. do it now?(y or n)

If I answer yes then it asks me the following:

Do you have Msys2 installed?

It then asks the directory into which this is installed. Not sure what this is or where its installed.

In my unit file I have the following lines:

;;latex extra package - additional goodies.
(add-hook 'LaTeX-mode-hook #'latex-extra-mode)
(setq latex-run-command "pdflatex")

;;use pdftools to preview
(pdf-tools-install) ;; start server

 (setq TeX-view-program-selection '((output-pdf "PDF Tools"))
 TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view))
    TeX-source-correlate-start-server t) ;; not sure if last line is neccessary

;; to have the buffer refresh after compilation
 (add-hook 'TeX-after-compilation-finished-functions
        #'TeX-revert-document-buffer)

Any help appreciated.

  • That looks like the raw pdf file. Can you view other pdf files successfully? – Andrew Swann Feb 19 '18 at 10:27
  • @AndrewSwann Yes, its the raw pdf. I tried another pdf (instead of one generated via tex) and same result. – Don Shanil Feb 19 '18 at 10:34
  • Edited question to include information on what occurs at emacs startup. – Don Shanil Feb 19 '18 at 11:34
  • Which operating system do you have? – Andrew Swann Feb 19 '18 at 11:41
  • 1
    Have you followed instructions at github.com/politza/pdf-tools/blob/master/…? – giordano Feb 19 '18 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.