VietTUG.org - old forum - threads' archive

thread_id = 1282, contains 1282, 1283, 1284
id = 1282, parent = 0, thread = 1282, catid = 17, locked = 0, moved = 0,
userid = hhp, ip = 203.210.253.6, time = 2006/02/26 (1140893715) ,
subject = dvips, unsecure mode * \\DeclareGraphicsRule, hits = 820, karma = 0+0-,
Mình có 2 file h.jpg và h.bb và dùng DeclareGraphicsRule để chuyển sang .eps với file test.tex là

\documentclass{article}
\usepackage[dvips]{graphicx}
\DeclareGraphicsRule{.jpg}{eps}{.bb}{`convert #1 eps:-}
\begin{document}
\includegraphics[totalheight=5in]{h.jpg}
\end{document}


1) latex test: test.dvi xem trong yap là OK

2) dvips test.dvi: thì có thông báo

"dvips: Secure mode is 1 so execute <convert h.jpg eps:-> will not run"

test.ps mở xem là trang trắng không đưa hình vào được. Bạn nào biết xin chỉ giúp. Cảm ơn.
 
id = 1283, parent = 1282, thread = 1282, catid = 17, locked = 0, moved = 0,
userid = kyanh, ip = 222.252.246.17, time = 2006/02/26 (1140894155) ,
subject = Re:DeclareGraphicsRule, hits = 0, karma = 0+0-,
LINK_HERE=20041001
The dvi file that you have created contains a special that wants to execute a program on your system. This is a potential security problem. Imagine that someone sends you a dvi file via mail or that you download something from a web page.

The default configuration of dvips was changed to disallow the execution of arbitrary programs. You can either:
- convert the graphics outside the dvips execution
- turn off the security settings of dvips (either in config.ps to change the default to "unsecure" or by passing a -R0 option)
ref#: http://lists.debian.org/debian-tetex-ma … 00216.html
 
id = 1284, parent = 1283, thread = 1282, catid = 17, locked = 0, moved = 0,
userid = hhp, ip = 203.210.253.6, time = 2006/02/26 (1140894507) ,
subject = Re:DeclareGraphicsRule, hits = 0, karma = 0+0-,
Rất tuyệt. Cảm ơn Kyanh.