吳聰敏老師的討論區 首頁 吳聰敏老師的討論區
經濟學與 cwTeX 討論區
 
 常見問題常見問題   搜尋搜尋   會員列表會員列表   會員群組會員群組   會員註冊會員註冊 
 個人資料個人資料   登入檢查您的私人訊息登入檢查您的私人訊息   登入登入 

pstopdf 有成功 但是辭法自動打開我要的PDF檔案

 
發表新主題   回覆主題    吳聰敏老師的討論區 首頁 -> cwTeX 討論區
上一篇主題 :: 下一篇主題  
發表人 內容
kuochih.chen



註冊時間: 2006-12-06
文章: 12

發表發表於: 星期六 七月 05, 2008 1:02 am    文章主題: pstopdf 有成功 但是辭法自動打開我要的PDF檔案 引言回覆

本人安裝的是 cwtex33 + miktex 2.7
OS 為 XP
本來有一些問題
爬文之後 自行解決一些
剩下一個
就是 pstopdf 本來以為不成功
但是發現 CConfused\xtemp 之下 有我要的PDFF檔案 而已
我用的PDF是 PDF-XChange PDF Viewer

例如Confused EXAMP3.ctx
我執行 CWPS 能正確開啟GSVIEW examp3.ps
接著執行 PSTOPDF
自動執行PDF-XChange PDF Viewer
但是卻是空白
偏偏CConfused\xtemp 之下有 examp3.pDF
所以PSTOPDF 有成功
如何自動打開examp3.pDF 呢?

查看Crimson Editor 發現是
cConfused\Program Files\cwtex\bin\pstopdf.bat

不知如何修正


kuochih.chen 在 星期六 七月 05, 2008 1:04 am 作了第 1 次修改
回頂端
檢視會員個人資料 發送私人訊息
kuochih.chen



註冊時間: 2006-12-06
文章: 12

發表發表於: 星期六 七月 05, 2008 1:03 am    文章主題: 底下是 PSTOPDF.BAT 的內容 引言回覆

@echo off
rem automatically find gswin32c.exe
rem Should also work for Win64
rem GS64 has the same file name

set gst="cConfused\Program Files\gs\gs8.60\bin\"gswin32c.exe
if exist "cConfused\Program Files\gs\gs8.60\bin\"gswin32c.exe goto run

if exist gspath.bat del gspath.bat
echo set>gspath.bat
dir "cConfused\Program Files\gs\gs8.60\bin\"gswin32c.exe/b/s>>gspath.bat
gsar -sset -r"set gst=" -o gspath.bat
gsar -sgst=:x0d:x0a -rgst= -o gspath.bat
gsar -sexe:x0d:x0ac:Confused\Prog -rexe:x0d:x0a"rem "cConfusedConfused\Prog -o gspath.bat
call gspath.bat
if exist gspath.bat del gspath.bat
if "%gst%"=="" goto errmsg0

:run
if exist %1.pdf pdfclose --file=%1.pdf
%gst% -q -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -dCompatibilityLevel=1.5 -sDEVICE=pdfwrite -sOutputFile=%1.pdf %1.ps
pdfopen --file %1.pdf
goto exit

:errmsg0
cls
echo.
echo.
echo Sorry, I can not find gswin32c.exe or gswin64c.exe in your computer.
echo.
echo Please make sure that you have installed ghostscript, and
echo.
echo set the path in the pstopdf.bat.
echo.
echo.
pause

:exit
回頂端
檢視會員個人資料 發送私人訊息
kuochih.chen



註冊時間: 2006-12-06
文章: 12

發表發表於: 星期六 七月 05, 2008 1:33 am    文章主題: 我在想是不是...... 引言回覆

我在想是不是要告訴 CWTEX
我用的不是 ACROBAT
而是另一種 PDF VIEWER
回頂端
檢視會員個人資料 發送私人訊息
tmwu
Site Admin


註冊時間: 2003-03-03
文章: 1535

發表發表於: 星期日 七月 06, 2008 10:36 am    文章主題: Re: 我在想是不是...... 引言回覆

batch 檔案的

pdfopen --file %1.pdf

是以 Acrobat 開啟 .pdf 之指令, 請自行修改。
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件
從之前的文章開始顯示:   
發表新主題   回覆主題    吳聰敏老師的討論區 首頁 -> cwTeX 討論區 所有的時間均為 台灣時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票


Powered by phpBB © 2001, 2005 phpBB Group
正體中文語系由 phpbb-tw 維護製作