導航:首頁 > 文檔加密 > docspdf

docspdf

發布時間:2023-01-31 23:40:10

Ⅰ 如何把word文檔轉化成pdf格式

如果你需要把Word文檔轉換成PDF格式的話,其實方法有很多,電腦上有很多種方法都可以將Word文檔轉換成PDF格式,有專門的在線網站可以轉換,也有專業的軟體進行轉換。

以上就是把Word文檔轉換成PDF格式的操作方法,希望對你有所幫助。

java代碼doc轉pdf提高效率的方法

使用了jacob.jar來調用activex控制項,本機需安裝WPS或pdfcreator
001 package experiments;
002
003 import com.jacob.activeX.ActiveXComponent;
004 import com.jacob.com.Dispatch;
005 import com.jacob.com.DispatchEvents;
006 import com.jacob.com.Variant;
007 import java.io.File;
008 import java.util.logging.Level;
009 import java.util.logging.Logger;
010
011 public class Doc2Pdf {
012
013 public static Converter newConverter(String name) {
014 if (name.equals("wps")) {
015 return new Wps();
016 } else if (name.equals("pdfcreator")) {
017 return new PdfCreator();
018 }
019 return null;
020 }
021
022 public synchronized static boolean convert(String word, String pdf) {
023 return newConverter("pdfcreator").convert(word, pdf);
024 }
025
026 public static interface Converter {
027
028 public boolean convert(String word, String pdf);
029 }
030
031 public static class Wps implements Converter {
032
033 public synchronized boolean convert(String word, String pdf) {
034 File pdfFile = new File(pdf);
035 File wordFile = new File(word);
036 ActiveXComponent wps = null;
037 try {
038 wps = new ActiveXComponent("wps.application");
039 ActiveXComponent doc = wps.invokeGetComponent("Documents").invokeGetComponent("Open", newVariant(wordFile.getAbsolutePath()));
040 doc.invoke("ExportPdf", new Variant(pdfFile.getAbsolutePath()));
041 doc.invoke("Close");
042 doc.safeRelease();
043 } catch (Exception ex) {
044 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
045 return false;
046 } catch (Error ex) {
047 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
048 return false;
049 } finally {
050 if (wps != null) {
051 wps.invoke("Terminate");
052 wps.safeRelease();
053 }
054 }
055 return true;
056 }
057 }
058
059 public static class PdfCreator implements Converter {
060
061 public static final int STATUS_IN_PROGRESS = 2;
062 public static final int STATUS_WITH_ERRORS = 1;
063 public static final int STATUS_READY = 0;
064 private ActiveXComponent pdfCreator;
065 private DispatchEvents dispatcher;
066 private volatile int status;
067 private Variant defaultPrinter;
068
069 private void init() {
070 pdfCreator = new ActiveXComponent("PDFCreator.clsPDFCreator");
071 dispatcher = new DispatchEvents(pdfCreator, this);
072 pdfCreator.setProperty("cVisible", new Variant(false));
073 pdfCreator.invoke("cStart", new Variant[]{newVariant("/NoProcessingAtStartup"), new Variant(true)});
074 setCOption("UseAutosave", 1);
075 setCOption("UseAutosaveDirectory", 1);
076 setCOption("AutosaveFormat", 0); // 0 = PDF
077 defaultPrinter = pdfCreator.getProperty("cDefaultPrinter");
078 status = STATUS_IN_PROGRESS;
079 pdfCreator.setProperty("cDefaultprinter", "PDFCreator");
080 pdfCreator.invoke("cClearCache");
081 pdfCreator.setProperty("cPrinterStop", false);
082 }
083
084 private void setCOption(String property, Object value) {
085 Dispatch.invoke(pdfCreator, "cOption", Dispatch.Put, new Object[]{property, value}, new int[2]);
086 }
087
088 private void close() {
089 if (pdfCreator != null) {
090 pdfCreator.setProperty("cDefaultprinter", defaultPrinter);
091 pdfCreator.invoke("cClearCache");
092 pdfCreator.setProperty("cPrinterStop", true);
093 pdfCreator.invoke("cClose");
094 pdfCreator.safeRelease();
095 pdfCreator = null;
096 }
097 if (dispatcher != null) {
098 dispatcher.safeRelease();
099 dispatcher = null;
100 }
101 }
102
103 public synchronized boolean convert(String word, String pdf) {
104 File pdfFile = new File(pdf);
105 File wordFile = new File(word);
106 try {
107 init();
108 setCOption("AutosaveDirectory", pdfFile.getParentFile().getAbsolutePath());
109 if (pdfFile.exists()) {
110 pdfFile.delete();
111 }
112 pdfCreator.invoke("cPrintfile", wordFile.getAbsolutePath());
113 int seconds = 0;
114 while (isInProcess()) {
115 seconds++;
116 if (seconds > 30) { // timeout
117 throw new Exception("convertion timeout!");
118 }
119 Thread.sleep(1000);
120 }
121 if (isWithErrors()) return false;
122 // 由於轉換前設置cOption的AutosaveFilename不能保證輸出的文件名與設置的相同(pdfcreator會加入/修改後綴名)
123 // 所以這里讓pdfcreator使用自動生成的文件名進行輸出,然後在保存後將其重命名為目標文件名
124 File outputFile = newFile(pdfCreator.getPropertyAsString("cOutputFilename"));
125 if (outputFile.exists()) {
126 outputFile.renameTo(pdfFile);
127 }
128 } catch (InterruptedException ex) {
129 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
130 return false;
131 } catch (Exception ex) {
132 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
133 return false;
134 } catch (Error ex) {
135 Logger.getLogger(Doc2Pdf.class.getName()).log(Level.SEVERE, null, ex);
136 return false;
137 } finally {
138 close();
139 }
140 return true;
141 }
142
143 private boolean isInProcess() {
144 return status == STATUS_IN_PROGRESS;
145 }
146
147 private boolean isWithErrors() {
148 return status == STATUS_WITH_ERRORS;
149 }
150
151 // eReady event
152 public void eReady(Variant[] args) {
153 status = STATUS_READY;
154 }
155
156 // eError event
157 public void eError(Variant[] args) {
158 status = STATUS_WITH_ERRORS;
159 }
160 }
161
162 public static void main(String[] args) {
163 convert("e:\\test.doc", "e:\\output.pdf");
164 }
165 }

Ⅲ 怎麼將word文檔轉換成pdf

轉換方式有以下兩種。

一、通過另存為PDF格式。

  1. 打開需要轉換格式的文檔,點擊左上角的圖標;

  2. 選擇 另存為 — PDF格式;

  3. 命名及選擇存儲位置,然後點擊確定即可。

Ⅳ 怎麼從word轉換成pdf

PDF格式良好的視覺閱讀性和通用性使得PDF文件的使用越來越廣泛了,網路上的PDF資料也越來越多,
pdf一般是不可以隨意修改的,
主要是用於閱讀的。
但是有時我們想要修改編輯,
Word怎樣轉換成PDF呢?
這里我們講解Word轉換PDF方法,
我提供幾個方法,
請根據合適的情況進行選擇。

1、Microsoft Office 2010 、WPS Office 2010環境

怎麼把word轉成pdf?在Word 2010、WPS Office可以直接另存Word文檔為PDF,支持中文,兼容性能夠保證。

Office 2010中另存Word為PDF(快捷鍵為F12):

WPS 2010輸出為PDF:

2、Microsoft Office 2007環境

Office 2007中word轉換PDF的方法也很簡單,只需安裝一個載入項,就能導出文件並將其保存為PDF和XPS格式。

2007 Microsoft Office載入項:Microsoft Save as PDF 或 XPS

補充說明:Office 2007 with SP2已經內置Save As PDF/XPS支持。

3、Microsoft Office 2003環境

Office 2003需要PDF虛擬列印機的支持,安裝虛擬列印機後,選擇文件->列印,在列印機列表中選擇PDF虛擬列印機,即可輸出為PDF。

推薦的虛擬列印機:TinyPDF、PDFCreator或Foxit PDF Creator。

4、未安裝MS Office環境的情況

如果沒有安裝任何Office軟體,可以使用SoftMaker Viewer,這是一款多功能Word文檔閱讀工具,可直接將文檔輸出為PDF文件。

5、利用在線應用

比如上傳到Google Docs,然後下載為PDF。

編後語:以上便是Word怎樣轉換成PDF的幾種方法,最簡單實用的就是直接在word另存為pdf格式,一般簡歷會存為pdf格式,以免被別人修改或復制的問題,用PDF閱讀更加有讀書的感覺。pdf的應用也越來越廣泛,傳統的讀書模式漸漸減少。

Ⅳ word轉換成pdf亂碼怎麼辦

word轉換成pdf亂碼出現的原因:
word含特殊字元,而pdf不存在該字元集,比如word是繁體的,而pdf沒有裝繁體庫,顯示不了繁體,從而出現亂碼。
解決方法:
出現這種情況,直接對亂碼的pdf文件是無法處理讓其正常顯示的,只能換其他的轉換方式,對word文檔重新進行轉換,下面推薦幾種出現亂碼幾率較低的轉換方法。
1、使用Word
2010、2007可以直接另存Word文檔為PDF,支持中文,一般不會出現亂碼的情況。
2、使用wps2010和2012將word轉換成pdf出現亂碼的幾率也比較低,直接點擊【文件】【輸出pdf】就可以了。
3、上傳到Google
Docs,然後下載為PDF,一般也不會出現亂碼的情況。

Ⅵ Docs PDF/PowerPoint Viewer這個插件怎麼用的

Powerpoint viewer 是專門閱讀PPT文件的閱讀工具,只能查看,不能編輯。

1,使用 PowerPoint Viewer,可以完全逼真地查看在 PowerPoint 97 或更高版本中創建的功能齊備的演示文稿。 此查看器還支持打開受密碼保護的 Microsoft PowerPoint 演示文稿。 在 PowerPoint Viewer 中可以查看和列印演示文稿,但是不能編輯它們。
2,可以使用 PowerPoint Viewer 附帶的字體進行顯示和列印,但是顯示和列印的內容必須來自運行 Microsoft Windows 操作系統的設備。

Ⅶ 如何把word文檔轉化成pdf格式

將word文件轉換成pdf格式的方法很多,主要有兩類。一類是使用軟體,另外一類則是在線的工具(Do
it
online)。
首先,常使用的軟體有:
1.
Adobe
Reader自帶的pdf轉換功能,可以創建一個新的pdf文檔,或者將word文件或其他格式的文件如.ppt
,.html等轉換成pdf,一般安裝Adobe
Reader之後,它會自動整合到office中去,在office的工具欄上就有轉化的圖標。
2.
PrimoPDF
(網址:http://www.primopdf.com/)
Completely
free
PDF
creator
-
Create
PDF
files
from
300+
file
types.
Make
100%
instry-standard
PDF
from
any
files
that
print.
Create
PDF
files
optimized
for
print,
screen,
ebook,
or
prepress.
3.
pdfMachine
White
可以把Windows應用軟體的列印數據流轉換成PDF文件。為生成PDF文件,使用者只需在
應用軟體的列印對話框中選擇pdfMachine驅動程序即可。
下載地址:http://www.pdfmachine.com/pdfmachine/download.shtml
4.
SolidConventerPDF
可以google一下,網上很多資源的。
5.
WPS
因為大家用微軟的office太多了,很少有人使用WPS,但是WPS中就有一項是可以將其文件格式轉換成PDF的,很方便。
在線的工具包括:
1.
Google
Docs
(谷歌文檔)
在谷歌主頁上選擇Google文檔,進入之後,將你的word文檔上傳或者復制粘貼到一個新建的documents中,然後選擇「下載另存方式」(downloads
as)可以保存成PDF格式或者RTF,word,html,openoffice。
2.
http://online.primopdf.com/
只要輸入你的郵箱,並將需要轉換格式的文件上傳,很快就可以在你的郵箱中看到已經轉換好格式的文件了。
3.
http://12.36.119.143/doc2pdf/convert_pdf.aspx
同樣是一個在線的服務。

閱讀全文

與docspdf相關的資料

熱點內容
適合程序員的年會節目 瀏覽:493
法國電影love西瓜 瀏覽:129
韓國電影男的通過樓上洞偷窺女的跳舞 瀏覽:487
護生畫集pdf 瀏覽:613
韓劇女主是美容院老闆娘,為了生計和客戶 瀏覽:364
吳於廑pdf 瀏覽:543
父子訓誡虐心 瀏覽:781
文件解壓大於100m怎麼辦 瀏覽:183
紅姐和麗姐是什麼電影 瀏覽:277
島國小電影站點 瀏覽:788
mes程序員創業 瀏覽:934
劉智泰演的雙胞胎 瀏覽:610
日本電影校園男主最後死了 瀏覽:957
香港古裝艷情史 瀏覽:461
一個小男孩和一個小女孩離家出走的電影 瀏覽:942
小說主角陳凡 瀏覽:75
壓縮機連鎖條件 瀏覽:234
奢侈的pdf 瀏覽:834
拜誰都不如拜自己電影叫啥 瀏覽:27
啄木鳥電影網頁 瀏覽:418