整合營銷服務(wù)商

          電腦端+手機端+微信端=數(shù)據(jù)同步管理

          免費咨詢熱線:

          PDF不知道怎么轉(zhuǎn)成HTML?推薦兩個快速轉(zhuǎn)換方法

          TML是網(wǎng)頁的通用語言,有時我們想要將pdf轉(zhuǎn)換為html 文件,這很容易嵌入到網(wǎng)頁中,并提取pdf中的圖像,那怎么把pdf轉(zhuǎn)換成html格式呢?這就要用到轉(zhuǎn)換工具了,下面就為大家分享pdf轉(zhuǎn)換成html的方法。

          工具一、迅捷PDF編輯器

          一款功能齊全的PDF編輯工具,可以很方便地將PDF轉(zhuǎn)成HTML格式。除此之外,它還支持其他格式的文件轉(zhuǎn)換和拆分合并等PDF處理功能,有需要的小伙伴可以自行選擇哦!

          PDF如何轉(zhuǎn)成HTML操作流程:

          第一步、手機應(yīng)用商店下載APP后,在軟件首頁下拉到PDF轉(zhuǎn)換一欄,選擇PDF轉(zhuǎn)HTML;

          第二步、點擊后頁面直接跳出選擇文件的選項,直接點擊即可。接著選擇我們需要轉(zhuǎn)換的PDF文件,

          第三步、選中文件后我們點擊立即轉(zhuǎn)換,就會自動進入轉(zhuǎn)換流程,等待幾秒轉(zhuǎn)換完畢就可以在文檔里面就可以查看轉(zhuǎn)換后的文件了,并且為了保護私密信息,在轉(zhuǎn)換完成后服務(wù)器會自動將文件的信息刪除,完全不用擔(dān)心機密信息外泄,到這里基本的轉(zhuǎn)換流程就已經(jīng)結(jié)束。

          工具二:迅捷PDF轉(zhuǎn)換器

          電腦端就可以用這個軟件,其PDF轉(zhuǎn)HTML的功能可以批量處理,提升咱們的工作效率。

          首先我們在首頁上方點擊PDF轉(zhuǎn)換,接著選擇文件轉(zhuǎn)HTML,添加文件后就可以轉(zhuǎn)換啦。

          關(guān)于pdf怎么轉(zhuǎn)換成html就介紹到這里了,有需要的小伙伴趕快去試試吧。


          html轉(zhuǎn)為pdf的組件有很多,但是還沒有哪一款能達到這個效果,其只要原因是wkhtmltopdf使用webkit網(wǎng)頁渲染引擎開發(fā)的用來將 html轉(zhuǎn)成 pdf的工具,可以跟多種腳本語言進行集成來轉(zhuǎn)換文檔。但是就使用簡便性來說還是itext等組件占據(jù)優(yōu)勢,如果你要轉(zhuǎn)換格式有比較高的要求,那么wkhtmltopdf絕對是不二之選!

          下載路徑

          官網(wǎng)地址 wkhtmltopdf.org/

          github地址 github.com/wkhtmltopdf…

          使用方法

          1. windows直接使用:只要在windows命令行中輸入c:\wkhtmltopdf.exe my.oschina.net/papio/blog/… c:\blog.pdf 就可以把這篇文章轉(zhuǎn)成pdf,并保存到C盤根目錄。
          2. java調(diào)用:java中調(diào)用wkhtmltopdf的命令Runtime.getRuntime().exec("c:\wkhtmltopdf.exe my.oschina.net/papio/blog/… c:\blog.pdf")就可以實現(xiàn)轉(zhuǎn)換。

          java調(diào)用demo

          public class HtmlToPdfInterceptor extends Thread { private InputStream is; public HtmlToPdfInterceptor(InputStream is){ this.is = is; } public void run(){ try{ InputStreamReader isr = new InputStreamReader(is, "utf-8"); BufferedReader br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { System.out.println(line.toString()); //輸出內(nèi)容 } }catch (IOException e){ e.printStackTrace(); } }}public class HtmlToPdf { //wkhtmltopdf在系統(tǒng)中的路徑 private static final String toPdfTool = "D:\wkhtmltopdf\bin\wkhtmltopdf.exe"; /** * html轉(zhuǎn)pdf * @param srcPath html路徑,可以是硬盤上的路徑,也可以是網(wǎng)絡(luò)路徑 * @param destPath pdf保存路徑 * @return 轉(zhuǎn)換成功返回true */ public static boolean convert(String srcPath, String destPath){ File file = new File(destPath); File parent = file.getParentFile(); //如果pdf保存路徑不存在,則創(chuàng)建路徑 if(!parent.exists()){ parent.mkdirs(); } StringBuilder cmd = new StringBuilder(); cmd.append(toPdfTool); cmd.append(" "); cmd.append(" --header-line");//頁眉下面的線 cmd.append(" --header-center 這里是頁眉這里是頁眉這里是頁眉這里是頁眉 ");//頁眉中間內(nèi)容 //cmd.append(" --margin-top 30mm ");//設(shè)置頁面上邊距 (default 10mm) cmd.append(" --header-spacing 10 ");//(設(shè)置頁眉和內(nèi)容的距離,默認0) cmd.append(srcPath); cmd.append(" "); cmd.append(destPath); boolean result = true; try{ Process proc = Runtime.getRuntime().exec(cmd.toString()); HtmlToPdfInterceptor error = new HtmlToPdfInterceptor(proc.getErrorStream()); HtmlToPdfInterceptor output = new HtmlToPdfInterceptor(proc.getInputStream()); error.start(); output.start(); proc.waitFor(); }catch(Exception e){ result = false; e.printStackTrace(); } return result; } public static void main(String[] args) { HtmlToPdf.convert("https://my.oschina.net/papio/blog/835645", "d:/wkhtmltopdf.pdf"); }}復(fù)制代碼

          wkhtmltopdf 參數(shù)詳解

          wkhtmltopdf [OPTIONS]... <input file> [More input files] <output file>常規(guī)選項 --allow <path> 允許加載從指定的文件夾中的文件或文件(可重復(fù)) --book* 設(shè)置一會打印一本書的時候,通常設(shè)置的選項 --collate 打印多份副本時整理 --cookie <name> <value> 設(shè)置一個額外的cookie(可重復(fù)) --cookie-jar <path> 讀取和寫入的Cookie,并在提供的cookie jar文件 --copies <number> 復(fù)印打印成pdf文件數(shù)(默認為1) --cover* <url> 使用HTML文件作為封面。它會帶頁眉和頁腳的TOC之前插入 --custom-header <name> <value> 設(shè)置一個附加的HTTP頭(可重復(fù)) --debug-javascript 顯示的javascript調(diào)試輸出 --default-header* 添加一個缺省的頭部,與頁面的左邊的名稱,頁面數(shù)到右邊,例如: --header-left '[webpage]' --header-right '[page]/[toPage]' --header-line --disable-external-links* 禁止生成鏈接到遠程網(wǎng)頁 --disable-internal-links* 禁止使用本地鏈接 --disable-javascript 禁止讓網(wǎng)頁執(zhí)行JavaScript --disable-pdf-compression* 禁止在PDF對象使用無損壓縮 --disable-smart-shrinking* 禁止使用WebKit的智能戰(zhàn)略收縮,使像素/ DPI比沒有不變 --disallow-local-file-access 禁止允許轉(zhuǎn)換的本地文件讀取其他本地文件,除非explecitily允許用 --allow --dpi <dpi> 顯式更改DPI(這對基于X11的系統(tǒng)沒有任何影響) --enable-plugins 啟用已安裝的插件(如Flash --encoding <encoding> 設(shè)置默認的文字編碼 --extended-help 顯示更廣泛的幫助,詳細介紹了不常見的命令開關(guān) --forms* 打開HTML表單字段轉(zhuǎn)換為PDF表單域 --grayscale PDF格式將在灰階產(chǎn)生 --help Display help --htmldoc 輸出程序HTML幫助 --ignore-load-errors 忽略claimes加載過程中已經(jīng)遇到了一個錯誤頁面 --lowquality 產(chǎn)生低品質(zhì)的PDF/ PS。有用縮小結(jié)果文檔的空間 --manpage 輸出程序手冊頁 --margin-bottom <unitreal> 設(shè)置頁面下邊距 (default 10mm) --margin-left <unitreal> 將左邊頁邊距 (default 10mm) --margin-right <unitreal> 設(shè)置頁面右邊距 (default 10mm) --margin-top <unitreal> 設(shè)置頁面上邊距 (default 10mm) --minimum-font-size <int> 最小字體大小 (default 5) --no-background 不打印背景 --orientation <orientation> 設(shè)置方向為橫向或縱向 --page-height <unitreal> 頁面高度 (default unit millimeter) --page-offset* <offset> 設(shè)置起始頁碼 (default 1) --page-size <size> 設(shè)置紙張大小: A4, Letter, etc. --page-width <unitreal> 頁面寬度 (default unit millimeter) --password <password> HTTP驗證密碼 --post <name> <value> Add an additional post field (repeatable) --post-file <name> <path> Post an aditional file (repeatable) --print-media-type* 使用的打印介質(zhì)類型,而不是屏幕 --proxy <proxy> 使用代理 --quiet Be less verbose --read-args-from-stdin 讀取標(biāo)準(zhǔn)輸入的命令行參數(shù) --readme 輸出程序自述 --redirect-delay <msec> 等待幾毫秒為JS-重定向(default 200) --replace* <name> <value> 替換名稱,值的頁眉和頁腳(可重復(fù)) --stop-slow-scripts 停止運行緩慢的JavaScripts --title <text> 生成的PDF文件的標(biāo)題(第一個文檔的標(biāo)題使用,如果沒有指定) --toc* 插入的內(nèi)容的表中的文件的開頭 --use-xserver* 使用X服務(wù)器(一些插件和其他的東西沒有X11可能無法正常工作) --user-style-sheet <url> 指定用戶的樣式表,加載在每一頁中 --username <username> HTTP認證的用戶名 --version 輸出版本信息退出 --zoom <float> 使用這個縮放因子 (default 1) 頁眉和頁腳選項--header-center* <text> (設(shè)置在中心位置的頁眉內(nèi)容) --header-font-name* <name> (default Arial) (設(shè)置頁眉的字體名稱)--header-font-size* <size> (設(shè)置頁眉的字體大小)--header-html* <url> (添加一個HTML頁眉,后面是網(wǎng)址)--header-left* <text> (左對齊的頁眉文本)--header-line* (顯示一條線在頁眉下)--header-right* <text> (右對齊頁眉文本)--header-spacing* <real> (設(shè)置頁眉和內(nèi)容的距離,默認0)--footer-center* <text> (設(shè)置在中心位置的頁腳內(nèi)容) --footer-font-name* <name> (設(shè)置頁腳的字體名稱) --footer-font-size* <size> (設(shè)置頁腳的字體大小default 11)--footer-html* <url> (添加一個HTML頁腳,后面是網(wǎng)址)--footer-left* <text> (左對齊的頁腳文本)--footer-line* 顯示一條線在頁腳內(nèi)容上)--footer-right* <text> (右對齊頁腳文本)--footer-spacing* <real> (設(shè)置頁腳和內(nèi)容的距離)./wkhtmltopdf --footer-right '[page]/[topage]' http://www.baidu.com baidu.pdf./wkhtmltopdf --header-center '報表' --header-line --margin-top 2cm --header-line http://192.168.212.139/oma/ oma.pdf表內(nèi)容選項中 --toc-depth* <level> Set the depth of the toc (default 3) --toc-disable-back-links* Do not link from section header to toc --toc-disable-links* Do not link from toc to sections --toc-font-name* <name> Set the font used for the toc (default Arial) --toc-header-font-name* <name> The font of the toc header (if unset use --toc-font-name) --toc-header-font-size* <size> The font size of the toc header (default 15) --toc-header-text* <text> The header text of the toc (default Table Of Contents) --toc-l1-font-size* <size> Set the font size on level 1 of the toc (default 12) --toc-l1-indentation* <num> Set indentation on level 1 of the toc (default 0) --toc-l2-font-size* <size> Set the font size on level 2 of the toc (default 10) --toc-l2-indentation* <num> Set indentation on level 2 of the toc (default 20) --toc-l3-font-size* <size> Set the font size on level 3 of the toc (default 8) --toc-l3-indentation* <num> Set indentation on level 3 of the toc (default 40) --toc-l4-font-size* <size> Set the font size on level 4 of the toc (default 6) --toc-l4-indentation* <num> Set indentation on level 4 of the toc (default 60) --toc-l5-font-size* <size> Set the font size on level 5 of the toc (default 4) --toc-l5-indentation* <num> Set indentation on level 5 of the toc (default 80) --toc-l6-font-size* <size> Set the font size on level 6 of the toc (default 2) --toc-l6-indentation* <num> Set indentation on level 6 of the toc (default 100) --toc-l7-font-size* <size> Set the font size on level 7 of the toc (default 0) --toc-l7-indentation* <num> Set indentation on level 7 of the toc (default 120) --toc-no-dots* Do not use dots, in the toc輪廓選項 --dump-outline <file> 轉(zhuǎn)儲目錄到一個文件 --outline 顯示目錄(文章中h1,h2來定) --outline-depth <level> 設(shè)置目錄的深度(默認為4)頁腳和頁眉 * [page] 由當(dāng)前正在打印的頁的數(shù)目代替 * [frompage] 由要打印的第一頁的數(shù)量取代 * [topage] 由最后一頁要打印的數(shù)量取代 * [webpage] 通過正在打印的頁面的URL替換 * [section] 由當(dāng)前節(jié)的名稱替換 * [subsection] 由當(dāng)前小節(jié)的名稱替換 * [date] 由當(dāng)前日期系統(tǒng)的本地格式取代 * [time] 由當(dāng)前時間,系統(tǒng)的本地格式取代
          作者:曹元
          鏈接:https://juejin.im/post/6856547881873047559
          來源:掘金
          著作權(quán)歸作者所有。商業(yè)轉(zhuǎn)載請聯(lián)系作者獲得授權(quán),非商業(yè)轉(zhuǎn)載請注明出處。

          DF文件是工作學(xué)習(xí)中的常客,在使用過程中,常常需要對PDF格式進行轉(zhuǎn)換,包括但不限于PDF轉(zhuǎn)Word、PDF轉(zhuǎn)PPT、PDF轉(zhuǎn)圖片等等。

          不過WPS雖然應(yīng)用廣泛,但是里面關(guān)于PDF的轉(zhuǎn)換工具必需要會員才可以使用,但又不愿意只為了轉(zhuǎn)換一次而花費錢去買會員,本文為大家提供了5款免費在線轉(zhuǎn)換PDF的網(wǎng)站,建議收藏以備不時之需~

          1、i love pdf

          I LOVE PDF是一款免費的PDF網(wǎng)站,界面設(shè)計簡潔,首頁沒有廣告,但每個功能的操作界面是有廣告的,不會影響使用。

          部分功能:合并PDF、拆分PDF、壓縮PDF、PDF轉(zhuǎn)換至Word、PDF轉(zhuǎn)換至PowerPoint、PDF轉(zhuǎn)換至Excel、word轉(zhuǎn)換至PDF文件、PowerPoint轉(zhuǎn)換至PDF、Excel轉(zhuǎn)換至PDF、PDF轉(zhuǎn)JPG、JPG轉(zhuǎn)PDF、頁碼、水印、旋轉(zhuǎn)PDF、HTML轉(zhuǎn)換PDF、PDF解密、PDF加密、排版PDF文件、PDF轉(zhuǎn)換PDF/A、修復(fù)PDF

          2、迅捷PDF轉(zhuǎn)換器

          免費的在線文檔格式轉(zhuǎn)換軟件,不僅有常見的格式,還有諸多不常見文檔格式在這里都有,包括電子書格式轉(zhuǎn)換,一個網(wǎng)站解決各種文檔格式轉(zhuǎn)換問題。

          部分功能:
          文檔轉(zhuǎn)換→DF轉(zhuǎn)換至Word、PDF轉(zhuǎn)換至PowerPoint、PDF轉(zhuǎn)換至Excel、word轉(zhuǎn)換至PDF文件、PowerPoint轉(zhuǎn)換至PDF、Excel轉(zhuǎn)換至PDF、PDF轉(zhuǎn)JPG、JPG轉(zhuǎn)PDF

          文檔處理→PDF臺并、PDF分割、PDF解密、PDF增加密碼、PDF修改密碼、PDF圖片獲取、PDF刪除頁、PDF頁面提取、PDF旋轉(zhuǎn)、PDF頁面編輯、PDF替換文字、PDF添加水印、PDF刪除水印、PDF添加文字、PDF刪除文字、PDF鏈接編輯、PDF添加頁碼、PDF刪除圖片、PDF背景顏色、PDF簽名等

          除此之外,還有音視頻格式轉(zhuǎn)等功能,網(wǎng)站功能免費,頁面沒有廣告,可以放心使用。

          3、PDF Candy

          轉(zhuǎn)換為PDF和20多種格式的文件。此外,PDF Candy提供47種在線工具來處理PDF:編輯、拆分、合并、壓縮等等。

          4、all to all

          ALL TO ALL在線格式轉(zhuǎn)換,國內(nèi)最全類型的在線文件轉(zhuǎn)換平臺,免費、快速,無須下載安裝任何軟件。支持約200多種格式的文件轉(zhuǎn)換,包括:視頻、音頻、圖片、字體等多媒體文件,以及常見的office文件、PDF、電子書等文檔。

          5、online2pdf

          ONLINE2PDF是個完全免費的良心線上PDF編輯網(wǎng)站,需要配合自帶翻譯功能的瀏覽器使用,目前國內(nèi)訪問正常,功能豐富,操作簡便。


          以上就是全部的內(nèi)容推薦啦,如果有幫助,記得點個贊吖~


          主站蜘蛛池模板: 国产一区视频在线免费观看| 国产一区二区久久久| 日本道免费精品一区二区| 国产剧情国产精品一区| 无码人妻一区二区三区一| 日韩精品一区二区午夜成人版| 久久国产香蕉一区精品| 免费无码A片一区二三区| 国产一区在线视频| 麻豆精品人妻一区二区三区蜜桃| 无码人妻av一区二区三区蜜臀| 中文字幕在线精品视频入口一区 | 一本大道东京热无码一区| 精品理论片一区二区三区| 亚洲高清日韩精品第一区| 相泽亚洲一区中文字幕| 日本高清无卡码一区二区久久| 国产精品揄拍一区二区久久| 在线观看国产区亚洲一区成人| 性色AV一区二区三区无码| 久久精品午夜一区二区福利| 成人乱码一区二区三区av| 精品视频一区二区三区四区五区| 无码日韩精品一区二区免费| 精品乱码一区二区三区四区| 久久成人国产精品一区二区| 波多野结衣一区二区三区88| 国产精品福利一区| 天天躁日日躁狠狠躁一区| 波多野结衣一区二区三区高清av| 亚洲综合一区二区三区四区五区| 国产精品高清一区二区人妖| 亚洲无码一区二区三区| 免费看AV毛片一区二区三区| 一区二区三区电影在线观看| 国模精品一区二区三区| 久久se精品一区精品二区| 欧美亚洲精品一区二区| 精品国产一区二区三区在线观看| 99精品一区二区免费视频 | 色一乱一伦一图一区二区精品|