A customized tex-print for latex family that generate a pdf file directly.It works now!
(defun tex-print (&optional alt)
"Print the .dvi file made by \\[tex-region], \\[tex-buffer] or \\[tex-file].
Runs the shell command defined by `tex-dvi-print-command'. If prefix argument
is provided, use the alternative command, `tex-alt-dvi-print-command'."
(interactive "P")
(let ((print-file-name-pdf (tex-append tex-print-file ".pdf"))
(print-file-name-dvi (tex-append tex-print-file ".dvi"))
test-name)
(if (and (not (equal (current-buffer) tex-last-buffer-texed))
(buffer-file-name)
;; Check that this buffer's printed file is up to date.
(or
(file-newer-than-file-p
(setq test-name (tex-append (buffer-file-name) ".pdf"))
(buffer-file-name))
(file-newer-than-file-p
(setq test-name (tex-append (buffer-file-name) ".dvi"))
(buffer-file-name))))
(setq print-file-name-dvi test-name))
(and
(not (file-exists-p print-file-name-dvi))
(file-exists-p print-file-name-pdf)
(setq print-file-name-dvi print-file-name-pdf))
(if (not (file-exists-p print-file-name-dvi))
(error "No appropriate `.pdf' nor `.dvi' file could be found %s " print-file-name-dvi)
(if (tex-shell-running)
(tex-kill-job)
(tex-start-shell))
(tex-send-command
(if alt tex-alt-dvi-print-command tex-dvi-print-command)
print-file-name-dvi
t))))