整合營(yíng)銷服務(wù)商

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

          免費(fèi)咨詢熱線:

          辦公技巧|有哪些能夠免費(fèi)轉(zhuǎn)換文檔的網(wǎng)站

          辦公技巧|有哪些能夠免費(fèi)轉(zhuǎn)換文檔的網(wǎng)站

          天就給大家介紹幾款可以實(shí)現(xiàn) PDF 轉(zhuǎn)換 Word 格式的免費(fèi)在線工具,收藏了它們,你不再需要下載安裝,只需一個(gè)可以上網(wǎng)的瀏覽器,把PDF文檔上傳到網(wǎng)站,馬上就能轉(zhuǎn)換出 doc 或 docx、rtf 等 Office 格式的文檔了,相當(dāng)?shù)姆奖銓?shí)用!如果這篇文章能幫上你的忙,或你的朋友有類似的需求,歡迎大家用各種方式擴(kuò)散~~~

          網(wǎng)站介紹

          一.迅捷在線轉(zhuǎn)換

          傳送門:http://app.xunjiepdf.com/

          迅捷在線pdf轉(zhuǎn)word轉(zhuǎn)換器免費(fèi)版為您提供將PDF轉(zhuǎn)換成WORD,word轉(zhuǎn)換成pdf,ppt轉(zhuǎn)換成pdf的免費(fèi)在線轉(zhuǎn)換服務(wù);是一款完全免費(fèi)的在線轉(zhuǎn)換工具,在線免費(fèi)完成PDF與word的轉(zhuǎn)換,在線免費(fèi)完成圖片與PDF的轉(zhuǎn)換,在線免費(fèi)完成PDF與TXT等的轉(zhuǎn)換,功能齊全,親測(cè)有用!!唯一的的缺點(diǎn)就是文檔限制2M

          1.主界面



          2.文檔轉(zhuǎn)換,功能齊全



          3.文檔處理



          4.在線PS等等



          二、office converter

          傳送門:https://cn.office-converter.com/Convert-to-Word

          這個(gè)免費(fèi)在線轉(zhuǎn)換器不只是一個(gè)在線文檔轉(zhuǎn)換器, 在線文件轉(zhuǎn)換器。比如快速轉(zhuǎn)換 PDF, Docx, Doc, Txt, ODT, SXW, RTF, WPD, HTML file formats轉(zhuǎn)換成Doc格式. 比如包括PDF轉(zhuǎn)換成Doc, Docx轉(zhuǎn)換成Doc,Doc轉(zhuǎn)換成Doc, Txt轉(zhuǎn)換成Doc, ODT轉(zhuǎn)換成Doc, SXW轉(zhuǎn)換成Doc, RTF轉(zhuǎn)換成Doc, WPD轉(zhuǎn)換成Doc, HTML轉(zhuǎn)換成Doc, PDF轉(zhuǎn)換成Docx, Docx轉(zhuǎn)換成Docx, Doc轉(zhuǎn)換成Docx, Txt轉(zhuǎn)換成Docx, ODT轉(zhuǎn)換成Docx, SXW轉(zhuǎn)換成Docx, RTF轉(zhuǎn)換成Docx, WPD轉(zhuǎn)換成Docx, HTML轉(zhuǎn)換成Docx等.

          • 注意:當(dāng)前用戶上傳的文件大小最大為:10 MB. 會(huì)員支持最大文件為:1G. 如果你還沒(méi)有帳號(hào),請(qǐng)立即注冊(cè)。注冊(cè)是完全免費(fèi)的。轉(zhuǎn)換后的文件將在1天后被自動(dòng)刪除。
          • 三、加加PDF

          傳送門:https://www.addpdf.cn/ppt-to-pdf



          免費(fèi)在線完成PDF轉(zhuǎn)Word,免費(fèi)在線完成Word轉(zhuǎn)PDF,免費(fèi)在線完成PDF轉(zhuǎn)JPG。功能是少了點(diǎn),但對(duì)文檔大小限制要大點(diǎn)(10M),也挺實(shí)用的。

          四、LightPDF、smallPDF等等






          最重要的一點(diǎn)

          有了上面的這些在線PDF轉(zhuǎn)換Word工具,基本已經(jīng)能滿足大部分人的需求了。不過(guò),因?yàn)檫@些網(wǎng)站都需要你上傳PDF文檔到它們的服務(wù)器之后才能為你轉(zhuǎn)換,所以如果你的PDF有比較重要且不希望被公開的信息,最好尋求別的途徑進(jìn)行轉(zhuǎn)換。或者使用迅捷在線轉(zhuǎn)換,也就是第一個(gè),這個(gè)文檔是有安全性的,自己可以選擇是否公開,也可以直接轉(zhuǎn)換后去把轉(zhuǎn)換記錄刪除掉即可。



          多時(shí)候在工作中會(huì)碰到完全由前端導(dǎo)出word文件的需求,因此特地記錄一下比較常用的幾種方式。

          一、提供一個(gè)word模板

          該方法提供一個(gè)word模板文件,數(shù)據(jù)通過(guò)參數(shù)替換的方式傳入word文件中,靈活性較差,適用于簡(jiǎn)單的文件導(dǎo)出。需要依賴:docxtemplater、file-saver、jszip-utils、pizzip


          import Docxtemplater from "docxtemplater";
          import { saveAs } from "file-saver";
          import JSZipUtils from "jszip-utils";
          import PizZip from "pizzip";
          
          export function downloadWithTemplate(path, data, fileName) {
            JSZipUtils.getBinaryContent(path, (error, content)=> {
              if (error) throw error;
          
              const zip=new PizZip(content);
              const doc=new Docxtemplater().loadZip(zip);
              doc.setData({
                ...data.form,
                // 循環(huán)項(xiàng)參數(shù)
                list: data.list,
                outsideList: data.outsideList,
              });
          
              try {
                doc.render();
              } catch (error) {
                const e={
                  message: error.message,
                  name: error.name,
                  stack: error.stack,
                  properties: error.properties,
                };
                ElMessage.error("文件格式有誤!");
                throw error;
              }
              const out=doc.getZip().generate({
                type: "blob",
                mimeType:
                  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
              });
              saveAs(out, fileName);
            });
          }
          
          let data={
              form: {
                title: "這是word標(biāo)題",
                test: "這是表單1的數(shù)據(jù)",
                test1: "111",
                test2: 222,
                test3: 333,
              },
              outsideList: [
                {
                  list: [
                    {
                      index: 0,
                      table: "表格第一項(xiàng)",
                      table1: "表格第二項(xiàng)",
                      table2: "表格第三項(xiàng)",
                    },
                    {
                      index: 1,
                      table: "表格第一項(xiàng)",
                      table1: "表格第二項(xiàng)",
                      table2: "表格第三項(xiàng)",
                    },
                  ],
                },
                {
                  list: [
                    {
                      index: 0,
                      table: "表格第一項(xiàng)",
                      table1: "表格第二項(xiàng)",
                      table2: "表格第三項(xiàng)",
                    },
                    {
                      index: 1,
                      table: "表格第一項(xiàng)",
                      table1: "表格第二項(xiàng)",
                      table2: "表格第三項(xiàng)",
                    },
                  ],
                },
              ],
            };
            
            downloadWithTemplate("template.docx", data, "模板word.docx")
            

          調(diào)用downloadWithTemplate方法即可導(dǎo)出如下文件:

          注: 上述方法中的path參數(shù)為你在vue項(xiàng)目中存放公共文件的位置,在vue2中為static文件夾下,在vue3中為public文件夾下。

          二、根據(jù)html代碼轉(zhuǎn)換為word文件(推薦)

          顧名思義,這個(gè)方法就是將我們?cè)陧?yè)面上書寫的html代碼直接轉(zhuǎn)換成word文件,這也是我最推薦的一種方法,因?yàn)榇蟛糠值臉邮娇煽兀耶吘故俏覀冚^為熟悉的方式。需要插件: html-docx-js-typescript、file-saver。


          import { saveAs } from "file-saver";
          import { asBlob } from "html-docx-js-typescript";
          
           export function downloadWordWithHtmlString(html, name) {
            let htmlString=`
            <!DOCTYPE html>
            <html lang="en">
            <head>
              <meta charset="UTF-8">
              <title>Document</title>
            </head>
            <body>
              ${html}
            </body>
            </html>
            `;
            asBlob(htmlString).then((data)=> {
              saveAs(data, `${name}.docx`);
            });
          }
            `

          使用案例:

          <div ref="word">
            <h3 style="text-align: center">word標(biāo)題</h3>
            <table
              border="1"
              cellspacing="0"
              width="600"
              style="font-size: 12px; color: #000; text-align: center"
            >
              <tr height="50">
                <td width="100">1111</td>
                <td widt="200" colspan="2">合并單元格</td>
                <td width="300">最長(zhǎng)的一項(xiàng)</td>
              </tr>
              <tr height="100">
                <td width="100">222</td>
                <td width="100">222</td>
                <td width="100">222</td>
                <td width="100">222</td>
              </tr>
            </table>
            <table width="600" border="1" cellspacing="0">
              <tr height="50">
                <td width="100">1111</td>
                <td rowspan="3">合并包括此行在內(nèi)的下面三行</td>
              </tr>
              <tr height="100">
                <td>222</td>
              </tr>
              <tr height="300">
                <td>3333</td>
              </tr>
              <tr>
                <td>50</td>
              </tr>
            </table>
          </div>
          
          let word=ref(null);
          downloadWordWithHtmlString(word.value.innerHTML, 'html字符串word.docx');

          生成的word文件可以看到效果和在網(wǎng)頁(yè)中的html代碼一樣:

          另外需要注意的是,若是需要在word中添加分頁(yè)符,在需要分頁(yè)的內(nèi)容處添加CSS屬性page-break-before即可。此時(shí)在瀏覽器上打印出innerHTML值會(huì)發(fā)現(xiàn):

          mdn上介紹page-break-before屬性已經(jīng)被break-before屬性替代,但是經(jīng)過(guò)我實(shí)際測(cè)試發(fā)現(xiàn)當(dāng)html字符串是page-break: always時(shí)生成的word文件沒(méi)有分頁(yè)效果,反而是將其替換回page-break-before后實(shí)現(xiàn)了分頁(yè)效果。若有大神知道這是什么問(wèn)題還望不吝賜教。 因此需要在downloadWordWithHtmlString方法中添加一句正則: htmlString=htmlString.replace( /break-(after|before): page/g, "page-break-: always;" );,此時(shí)就能實(shí)現(xiàn)分頁(yè)效果。


          三、使用docx插件

          第二種方法有個(gè)很致命的問(wèn)題就是它無(wú)法在生成的word文件中添加圖片頁(yè)眉,我搜遍了npm也只找到一個(gè)能添加文字頁(yè)眉的插件: html-docx-ts。要想實(shí)現(xiàn)這個(gè)需求,就需要用到docx插件。 docx官網(wǎng)的介紹是"Easily generate and modify .docx files with JS/TS. Works for Node and on the Browser.",意味著是一個(gè)專門用于生成word和修改word的文件。該插件就需要一個(gè)一個(gè)去配置你要生成的項(xiàng),然后組合成一個(gè)word。一個(gè)簡(jiǎn)單的案例是:


          import {
            Document,
            Paragraph,
            Header,
            TextRun,
            Table,
            TableRow,
            TableCell,
            WidthType,
            Packer,
          } from "docx";
          import { saveAs } from "file-saver";
          
          const document=new Document({
              sections: [
                {
                  headers: {
                    default: new Header({
                      children: [new Paragraph("我是頁(yè)眉")],
                    }),
                  },
                  children: [
                    new Paragraph({
                      children: [
                        new TextRun({
                          text: "我是文字內(nèi)容",
                          size: 16,
                          bold: true,
                        }),
                      ],
                    }),
                    new Table({
                      columnWidths: [1500, 7500],
                      rows: [
                        new TableRow({
                          children: [
                            new TableCell({
                              width: {
                                size: 1500,
                                type: WidthType.DXA,
                              },
                              children: [
                                new Paragraph({
                                  alignment: "center",
                                  children: [
                                    new TextRun({
                                      text: "測(cè)試",
                                      size: 24,
                                      font: {
                                        name: "楷體",
                                      },
                                    }),
                                  ],
                                }),
                              ],
                            }),
                          ],
                        }),
                      ],
                    }),
                  ],
                },
              ],
            });
            
            Packer.toBlob(document).then((blob)=> {
              saveAs(blob, "test.docx");
            });

          導(dǎo)出的word文件形式為

          下面是我個(gè)人總結(jié)的比較常見能用到的功能和配置項(xiàng):

          // 導(dǎo)出文字
          1.new Paragraph(text) -> 默認(rèn)字體樣式: 宋體,五號(hào)字
          2.new Paragraph({
              children: [
                new TextRun({
                  text: "我是文字內(nèi)容",
                  size: 16, // 對(duì)應(yīng)word中的字體大小8
                  bold: true, // 是否加粗
                  underline: {
                    type: UnderlineType.SINGLE,
                    color: "#2e32ee",
                  }, // 下劃線類型及顏色
                  font: {
                    name: "仿宋", // 只要是word中有的字體類型都可以生效
                  },
                }),
              ],
              indent: {
                left: 100,
              }, // 離左邊距離 類似于margin-left
              spacing: {
                before: 150,
                after: 200,
              }, // 離上邊和下邊的距離 類似于margin-top/bottom
              alignment: "center", // 對(duì)齊方式
              pageBreakBefore: true, // 是否在這段文字前加入分頁(yè)符
            })
            
           // 導(dǎo)出表格
          new Table({
            columnWidths: [1500, 7500], // 表示單行有幾項(xiàng),總寬度是9000,對(duì)應(yīng)寬度;
            rows: [
              new TableRow({
                children: [
                  new TableCell({
                    width: {
                      size: 1500, // 需與columnWidths的第一項(xiàng)對(duì)應(yīng)
                      type: WidthType.DXA, // 官網(wǎng)的介紹是Value is in twentieths of a point
                      // 因?yàn)楸砀竦目倢挾仁且詔wips(每英寸的1/20)為單位進(jìn)行計(jì)算的
                    },
                    children: [
                      new Paragraph({
                        alignment: "center",
                        children: [
                          new TextRun({
                            text: "測(cè)試",
                            size: 24,
                            font: {
                              name: "楷體",
                            },
                          }),
                        ],
                      }),
                    ],
                  }),
                  new TableCell({
                    width: {
                      size: 7500,
                      type: WidthType.DXA,
                    },
                    children: [
                      new Paragraph('ccc'),
                    ],
                    margins: {
                      top: 500,
                      bottom: 500,
                      left: 500
                    } // 類似于單元格內(nèi)容的padding
                  }),
                ],
              }),
            ],
          })
          
          // 導(dǎo)出圖片
          new Paragraph({
            children: [
              new ImageRun({
                data: "base64", // 圖片需轉(zhuǎn)成base64的形式
                transformation: {
                  width: 100,
                  height: 30,
                }, // 圖片寬高
              }),
            ],
          })
          
          // 設(shè)置頁(yè)眉頁(yè)腳
          headers: {
            default: new Header({
              children: [new Paragraph("我是頁(yè)眉")],
            }),
          },
          footers: {
            default: new Footer({
              children: [new Paragraph("我是頁(yè)腳")],
            }),
          }

          下面是一個(gè)完整的使用案例:

          const document=new Document({
            sections: [
              {
                headers: {
                  default: new Header({
                    children: [
                      new Paragraph({
                        children: [
                          new ImageRun({
                            data: "data:image/jpeg;base64,...",
                            transformation: {
                              width: 150,
                              height: 150,
                            },
                          }),
                        ],
                      }),
                    ],
                  }),
                },
                footers: {
                  default: new Footer({
                    children: [new Paragraph("我是頁(yè)腳")],
                  }),
                },
                children: [
                   new Paragraph("第一行直接默認(rèn)形式"),
                   new Paragraph({
                     children: [
                       new TextRun({
                         text: "下一頁(yè)",
                       }),
                     ],
                     pageBreakBefore: true,
                   }),
                   new Table({
                     columnWidths: [1500, 7500],
                     rows: [
                       new TableRow({
                         children: [
                           new TableCell({
                             width: {
                               size: 1500,
                               type: WidthType.DXA,
                             },
                             children: [
                               new Paragraph({
                                 alignment: "center",
                                 children: [
                                   new TextRun({
                                     text: "測(cè)試",
                                     size: 24,
                                     font: {
                                       name: "楷體",
                                     },
                                   }),
                                 ],
                               }),
                             ],
                           }),
                           new TableCell({
                             width: {
                               size: 7500,
                               type: WidthType.DXA,
                             },
                             children: [
                               new Paragraph({
                                 children: [
                                   new ImageRun({
                                     data: "data:image/jpeg;base64,...",
                                     transformation: {
                                       width: 150,
                                       height: 150,
                                     },
                                   }),
                                 ],
                               }),
                             ],
                             margins: {
                               top: 500,
                               bottom: 500,
                              left: 500,
                            },
                          }),
                        ],
                      }),
                    ],
                  }),
                ],
              },
            ],
          });
          
          Packer.toBlob(document).then((blob)=> {
            saveAs(blob, "test.docx");
          });

          此時(shí)導(dǎo)出的word文件如下:

          若是以上內(nèi)容有任何有問(wèn)題的地方或是更好的解決方案,還望各位大神不吝賜教!

          、前言

          實(shí)現(xiàn)文檔在線預(yù)覽的方式除了上篇文章 文檔在線預(yù)覽新版(一)通過(guò)將文件轉(zhuǎn)成圖片實(shí)現(xiàn)在線預(yù)覽功能說(shuō)的將文檔轉(zhuǎn)成圖片的實(shí)現(xiàn)方式外,還有轉(zhuǎn)成pdf,前端通過(guò)pdf.js、pdfobject.js等插件來(lái)實(shí)現(xiàn)在線預(yù)覽,以及本文將要說(shuō)到的將文檔轉(zhuǎn)成html的方式來(lái)實(shí)現(xiàn)在線預(yù)覽。

          以下代碼分別提供基于aspose、pdfbox、spire來(lái)實(shí)現(xiàn)來(lái)實(shí)現(xiàn)txt、word、pdf、ppt、word等文件轉(zhuǎn)圖片的需求。

          1、aspose

          Aspose 是一家致力于.Net ,Java,SharePoint,JasperReports和SSRS組件的提供商,數(shù)十個(gè)國(guó)家的數(shù)千機(jī)構(gòu)都有用過(guò)aspose組件,創(chuàng)建、編輯、轉(zhuǎn)換或渲染 Office、OpenOffice、PDF、圖像、ZIP、CAD、XPS、EPS、PSD 和更多文件格式。注意aspose是商用組件,未經(jīng)授權(quán)導(dǎo)出文件里面都是是水印(尊重版權(quán),遠(yuǎn)離破解版)。

          需要在項(xiàng)目的pom文件里添加如下依賴

                  <dependency>
                      <groupId>com.aspose</groupId>
                      <artifactId>aspose-words</artifactId>
                      <version>23.1</version>
                  </dependency>
                  <dependency>
                      <groupId>com.aspose</groupId>
                      <artifactId>aspose-pdf</artifactId>
                      <version>23.1</version>
                  </dependency>
                  <dependency>
                      <groupId>com.aspose</groupId>
                      <artifactId>aspose-cells</artifactId>
                      <version>23.1</version>
                  </dependency>
                  <dependency>
                      <groupId>com.aspose</groupId>
                      <artifactId>aspose-slides</artifactId>
                      <version>23.1</version>
                  </dependency>
          

          2 、poi + pdfbox

          因?yàn)閍spose和spire雖然好用,但是都是是商用組件,所以這里也提供使用開源庫(kù)操作的方式的方式。

          POI是Apache軟件基金會(huì)用Java編寫的免費(fèi)開源的跨平臺(tái)的 Java API,Apache POI提供API給Java程序?qū)icrosoft Office格式檔案讀和寫的功能。

          Apache PDFBox是一個(gè)開源Java庫(kù),支持PDF文檔的開發(fā)和轉(zhuǎn)換。 使用此庫(kù),您可以開發(fā)用于創(chuàng)建,轉(zhuǎn)換和操作PDF文檔的Java程序。

          需要在項(xiàng)目的pom文件里添加如下依賴

          		<dependency>
                      <groupId>org.apache.pdfbox</groupId>
                      <artifactId>pdfbox</artifactId>
                      <version>2.0.4</version>
                  </dependency>
          		<dependency>
                      <groupId>org.apache.poi</groupId>
                      <artifactId>poi</artifactId>
                      <version>5.2.0</version>
                  </dependency>
                  <dependency>
                      <groupId>org.apache.poi</groupId>
                      <artifactId>poi-ooxml</artifactId>
                      <version>5.2.0</version>
                  </dependency>
                  <dependency>
                      <groupId>org.apache.poi</groupId>
                      <artifactId>poi-scratchpad</artifactId>
                      <version>5.2.0</version>
                  </dependency>
                  <dependency>
                      <groupId>org.apache.poi</groupId>
                      <artifactId>poi-excelant</artifactId>
                      <version>5.2.0</version>
                  </dependency>
          

          3 spire

          spire一款專業(yè)的Office編程組件,涵蓋了對(duì)Word、Excel、PPT、PDF等文件的讀寫、編輯、查看功能。spire提供免費(fèi)版本,但是存在只能導(dǎo)出前3頁(yè)以及只能導(dǎo)出前500行的限制,只要達(dá)到其一就會(huì)觸發(fā)限制。需要超出前3頁(yè)以及只能導(dǎo)出前500行的限制的這需要購(gòu)買付費(fèi)版(尊重版權(quán),遠(yuǎn)離破解版)。這里使用免費(fèi)版進(jìn)行演示。

          spire在添加pom之前還得先添加maven倉(cāng)庫(kù)來(lái)源

          		<repository>
                      <id>com.e-iceblue</id>
                      <name>e-iceblue</name>
                      <url>https://repo.e-iceblue.cn/repository/maven-public/</url>
                  </repository>
          

          接著在項(xiàng)目的pom文件里添加如下依賴

          免費(fèi)版:

          		<dependency>
                      <groupId>e-iceblue</groupId>
                      <artifactId>spire.office.free</artifactId>
                      <version>5.3.1</version>
                  </dependency>
          

          付費(fèi)版版:

          		<dependency>
                      <groupId>e-iceblue</groupId>
                      <artifactId>spire.office</artifactId>
                      <version>5.3.1</version>
                  </dependency>
          

          二、將文件轉(zhuǎn)換成html字符串

          1、將word文件轉(zhuǎn)成html字符串

          1.1 使用aspose

          public static String wordToHtmlStr(String wordPath) {
                  try {
                      Document doc=new Document(wordPath); // Address是將要被轉(zhuǎn)化的word文檔
                      String htmlStr=doc.toString();
                      return htmlStr;
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
                  return null;
              }
          

          驗(yàn)證結(jié)果:

          1.2 使用poi

          public String wordToHtmlStr(String wordPath) throws TransformerException, IOException, ParserConfigurationException {
                  String htmlStr=null;
                  String ext=wordPath.substring(wordPath.lastIndexOf("."));
                  if (ext.equals(".docx")) {
                      htmlStr=word2007ToHtmlStr(wordPath);
                  } else if (ext.equals(".doc")){
                      htmlStr=word2003ToHtmlStr(wordPath);
                  } else {
                      throw new RuntimeException("文件格式不正確");
                  }
                  return htmlStr;
              }
          
              public String word2007ToHtmlStr(String wordPath) throws IOException {
                  // 使用內(nèi)存輸出流
                  try(ByteArrayOutputStream out=new ByteArrayOutputStream()){
                      word2007ToHtmlOutputStream(wordPath, out);
                      return out.toString();
                  }
              }
          
              private void word2007ToHtmlOutputStream(String wordPath,OutputStream out) throws IOException {
                  ZipSecureFile.setMinInflateRatio(-1.0d);
                  InputStream in=Files.newInputStream(Paths.get(wordPath));
                  XWPFDocument document=new XWPFDocument(in);
                  XHTMLOptions options=XHTMLOptions.create().setIgnoreStylesIfUnused(false).setImageManager(new Base64EmbedImgManager());
                  // 使用內(nèi)存輸出流
                  XHTMLConverter.getInstance().convert(document, out, options);
              }
          
          
              private String word2003ToHtmlStr(String wordPath) throws TransformerException, IOException, ParserConfigurationException {
                  org.w3c.dom.Document htmlDocument=word2003ToHtmlDocument(wordPath);
                  // Transform document to string
                  StringWriter writer=new StringWriter();
                  TransformerFactory tf=TransformerFactory.newInstance();
                  Transformer transformer=tf.newTransformer();
                  transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
                  transformer.setOutputProperty(OutputKeys.METHOD, "html");
                  transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                  transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                  transformer.transform(new DOMSource(htmlDocument), new StreamResult(writer));
                  return writer.toString();
              }
          
          private org.w3c.dom.Document word2003ToHtmlDocument(String wordPath) throws IOException, ParserConfigurationException {
                  InputStream input=Files.newInputStream(Paths.get(wordPath));
                  HWPFDocument wordDocument=new HWPFDocument(input);
                  WordToHtmlConverter wordToHtmlConverter=new WordToHtmlConverter(
                          DocumentBuilderFactory.newInstance().newDocumentBuilder()
                                  .newDocument());
                  wordToHtmlConverter.setPicturesManager((content, pictureType, suggestedName, widthInches, heightInches) -> {
                      System.out.println(pictureType);
                      if (PictureType.UNKNOWN.equals(pictureType)) {
                          return null;
                      }
                      BufferedImage bufferedImage=ImgUtil.toImage(content);
                      String base64Img=ImgUtil.toBase64(bufferedImage, pictureType.getExtension());
                      //  帶圖片的word,則將圖片轉(zhuǎn)為base64編碼,保存在一個(gè)頁(yè)面中
                      StringBuilder sb=(new StringBuilder(base64Img.length() + "data:;base64,".length()).append("data:;base64,").append(base64Img));
                      return sb.toString();
                  });
                  // 解析word文檔
                  wordToHtmlConverter.processDocument(wordDocument);
                  return wordToHtmlConverter.getDocument();
              }

          1.3 使用spire

           public String wordToHtmlStr(String wordPath) throws IOException {
                  try(ByteArrayOutputStream outputStream=new ByteArrayOutputStream()) {
                      Document document=new Document();
                      document.loadFromFile(wordPath);
                      document.saveToFile(outputStream, FileFormat.Html);
                      return outputStream.toString();
                  }
              }

          2、將pdf文件轉(zhuǎn)成html字符串

          2.1 使用aspose

          public static String pdfToHtmlStr(String pdfPath) throws IOException, ParserConfigurationException {
                  PDDocument document=PDDocument.load(new File(pdfPath));
                  Writer writer=new StringWriter();
                  new PDFDomTree().writeText(document, writer);
                  writer.close();
                  document.close();
                  return writer.toString();
              }

          驗(yàn)證結(jié)果:

          2.2 使用 poi + pbfbox

          public String pdfToHtmlStr(String pdfPath) throws IOException, ParserConfigurationException {
                  PDDocument document=PDDocument.load(new File(pdfPath));
                  Writer writer=new StringWriter();
                  new PDFDomTree().writeText(document, writer);
                  writer.close();
                  document.close();
                  return writer.toString();
              }

          2.3 使用spire

          public String pdfToHtmlStr(String pdfPath) throws IOException, ParserConfigurationException {
                  try(ByteArrayOutputStream outputStream=new ByteArrayOutputStream()) {
                      PdfDocument pdf=new PdfDocument();
                      pdf.loadFromFile(pdfPath);
                      return outputStream.toString();
                  }
              }
          

          3、將excel文件轉(zhuǎn)成html字符串

          3.1 使用aspose

          public static String excelToHtmlStr(String excelPath) throws Exception {
                  FileInputStream fileInputStream=new FileInputStream(excelPath);
                  Workbook workbook=new XSSFWorkbook(fileInputStream);
                  DataFormatter dataFormatter=new DataFormatter();
                  FormulaEvaluator formulaEvaluator=workbook.getCreationHelper().createFormulaEvaluator();
                  Sheet sheet=workbook.getSheetAt(0);
                  StringBuilder htmlStringBuilder=new StringBuilder();
                  htmlStringBuilder.append("<html><head><title>Excel to HTML using Java and POI library</title>");
                  htmlStringBuilder.append("<style>table, th, td { border: 1px solid black; }</style>");
                  htmlStringBuilder.append("</head><body><table>");
                  for (Row row : sheet) {
                      htmlStringBuilder.append("<tr>");
                      for (Cell cell : row) {
                          CellType cellType=cell.getCellType();
                          if (cellType==CellType.FORMULA) {
                              formulaEvaluator.evaluateFormulaCell(cell);
                              cellType=cell.getCachedFormulaResultType();
                          }
                          String cellValue=dataFormatter.formatCellValue(cell, formulaEvaluator);
                          htmlStringBuilder.append("<td>").append(cellValue).append("</td>");
                      }
                      htmlStringBuilder.append("</tr>");
                  }
                  htmlStringBuilder.append("</table></body></html>");
                  return htmlStringBuilder.toString();
              }
          

          返回的html字符串:

          <html><head><title>Excel to HTML using Java and POI library</title><style>table, th, td { border: 1px solid black; }</style></head><body><table><tr><td>序號(hào)</td><td>姓名</td><td>性別</td><td>聯(lián)系方式</td><td>地址</td></tr><tr><td>1</td><td>張曉玲</td><td>女</td><td>11111111111</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>2</td><td>王小二</td><td>男</td><td>1222222</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>1</td><td>張曉玲</td><td>女</td><td>11111111111</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>2</td><td>王小二</td><td>男</td><td>1222222</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>1</td><td>張曉玲</td><td>女</td><td>11111111111</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>2</td><td>王小二</td><td>男</td><td>1222222</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>1</td><td>張曉玲</td><td>女</td><td>11111111111</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>2</td><td>王小二</td><td>男</td><td>1222222</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>1</td><td>張曉玲</td><td>女</td><td>11111111111</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>2</td><td>王小二</td><td>男</td><td>1222222</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>1</td><td>張曉玲</td><td>女</td><td>11111111111</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>2</td><td>王小二</td><td>男</td><td>1222222</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>1</td><td>張曉玲</td><td>女</td><td>11111111111</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr><tr><td>2</td><td>王小二</td><td>男</td><td>1222222</td><td>上海市浦東新區(qū)xx路xx弄xx號(hào)</td></tr></table></body></html>
          

          3.2 使用poi + pdfbox

          public String excelToHtmlStr(String excelPath) throws Exception {
                  FileInputStream fileInputStream=new FileInputStream(excelPath);
                  try (Workbook workbook=WorkbookFactory.create(new File(excelPath))){
                      DataFormatter dataFormatter=new DataFormatter();
                      FormulaEvaluator formulaEvaluator=workbook.getCreationHelper().createFormulaEvaluator();
                      org.apache.poi.ss.usermodel.Sheet sheet=workbook.getSheetAt(0);
                      StringBuilder htmlStringBuilder=new StringBuilder();
                      htmlStringBuilder.append("<html><head><title>Excel to HTML using Java and POI library</title>");
                      htmlStringBuilder.append("<style>table, th, td { border: 1px solid black; }</style>");
                      htmlStringBuilder.append("</head><body><table>");
                      for (Row row : sheet) {
                          htmlStringBuilder.append("<tr>");
                          for (Cell cell : row) {
                              CellType cellType=cell.getCellType();
                              if (cellType==CellType.FORMULA) {
                                  formulaEvaluator.evaluateFormulaCell(cell);
                                  cellType=cell.getCachedFormulaResultType();
                              }
                              String cellValue=dataFormatter.formatCellValue(cell, formulaEvaluator);
                              htmlStringBuilder.append("<td>").append(cellValue).append("</td>");
                          }
                          htmlStringBuilder.append("</tr>");
                      }
                      htmlStringBuilder.append("</table></body></html>");
                      return htmlStringBuilder.toString();
                  }
              }
          

          3.3 使用spire

          public String excelToHtmlStr(String excelPath) throws Exception {
                  try(ByteArrayOutputStream outputStream=new ByteArrayOutputStream()) {
                      Workbook workbook=new Workbook();
                      workbook.loadFromFile(excelPath);
                      workbook.saveToStream(outputStream, com.spire.xls.FileFormat.HTML);
                      return outputStream.toString();
                  }
              }
          

          三、將文件轉(zhuǎn)換成html,并生成html文件

          有時(shí)我們是需要的不僅僅返回html字符串,而是需要生成一個(gè)html文件這時(shí)應(yīng)該怎么做呢?一個(gè)改動(dòng)量小的做法就是使用org.apache.commons.io包下的FileUtils工具類寫入目標(biāo)地址:

          FileUtils類將html字符串生成html文件示例:

          首先需要引入pom:

          		<dependency>
                      <groupId>commons-io</groupId>
                      <artifactId>commons-io</artifactId>
                      <version>2.8.0</version>
                  </dependency>
          

          相關(guān)代碼:

          String htmlStr=FileConvertUtil.pdfToHtmlStr("D:\\書籍\\電子書\\小說(shuō)\\歷史小說(shuō)\\最后的可汗.doc");
          FileUtils.write(new File("D:\\test\\doc.html"), htmlStr, "utf-8");
          

          除此之外,還可以對(duì)上面的代碼進(jìn)行一些調(diào)整,已實(shí)現(xiàn)生成html文件,代碼調(diào)整如下:

          1、將word文件轉(zhuǎn)換成html文件

          word原文件效果:

          1.1 使用aspose

          public static void wordToHtml(String wordPath, String htmlPath) {
                  try {
                      File sourceFile=new File(wordPath);
                      String path=htmlPath + File.separator + sourceFile.getName().substring(0, sourceFile.getName().lastIndexOf(".")) + ".html";
                      File file=new File(path); // 新建一個(gè)空白pdf文檔
                      FileOutputStream os=new FileOutputStream(file);
                      Document doc=new Document(wordPath); // Address是將要被轉(zhuǎn)化的word文檔
                      HtmlSaveOptions options=new HtmlSaveOptions();
                      options.setExportImagesAsBase64(true);
                      options.setExportRelativeFontSize(true);
                      doc.save(os, options);
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
              }
          

          轉(zhuǎn)換成html的效果:

          1.2 使用poi + pdfbox

          public void wordToHtml(String wordPath, String htmlPath) throws TransformerException, IOException, ParserConfigurationException {
                  htmlPath=FileUtil.getNewFileFullPath(wordPath, htmlPath, "html");
                  String ext=wordPath.substring(wordPath.lastIndexOf("."));
                  if (ext.equals(".docx")) {
                      word2007ToHtml(wordPath, htmlPath);
                  } else if (ext.equals(".doc")){
                      word2003ToHtml(wordPath, htmlPath);
                  } else {
                      throw new RuntimeException("文件格式不正確");
                  }
              }
          
              public void word2007ToHtml(String wordPath, String htmlPath) throws TransformerException, IOException, ParserConfigurationException {
                  //try(OutputStream out=Files.newOutputStream(Paths.get(path))){
                  try(FileOutputStream out=new FileOutputStream(htmlPath)){
                      word2007ToHtmlOutputStream(wordPath, out);
                  }
              }
          
              private void word2007ToHtmlOutputStream(String wordPath,OutputStream out) throws IOException {
                  ZipSecureFile.setMinInflateRatio(-1.0d);
                  InputStream in=Files.newInputStream(Paths.get(wordPath));
                  XWPFDocument document=new XWPFDocument(in);
                  XHTMLOptions options=XHTMLOptions.create().setIgnoreStylesIfUnused(false).setImageManager(new Base64EmbedImgManager());
                  // 使用內(nèi)存輸出流
                  XHTMLConverter.getInstance().convert(document, out, options);
              }
          
              public void word2003ToHtml(String wordPath, String htmlPath) throws TransformerException, IOException, ParserConfigurationException {
                  org.w3c.dom.Document htmlDocument=word2003ToHtmlDocument(wordPath);
                  // 生成html文件地址
          
                  try(OutputStream outStream=Files.newOutputStream(Paths.get(htmlPath))){
                      DOMSource domSource=new DOMSource(htmlDocument);
                      StreamResult streamResult=new StreamResult(outStream);
                      TransformerFactory factory=TransformerFactory.newInstance();
                      Transformer serializer=factory.newTransformer();
                      serializer.setOutputProperty(OutputKeys.ENCODING, "utf-8");
                      serializer.setOutputProperty(OutputKeys.INDENT, "yes");
                      serializer.setOutputProperty(OutputKeys.METHOD, "html");
                      serializer.transform(domSource, streamResult);
                  }
              }
          
              private org.w3c.dom.Document word2003ToHtmlDocument(String wordPath) throws IOException, ParserConfigurationException {
                  InputStream input=Files.newInputStream(Paths.get(wordPath));
                  HWPFDocument wordDocument=new HWPFDocument(input);
                  WordToHtmlConverter wordToHtmlConverter=new WordToHtmlConverter(
                          DocumentBuilderFactory.newInstance().newDocumentBuilder()
                                  .newDocument());
                  wordToHtmlConverter.setPicturesManager((content, pictureType, suggestedName, widthInches, heightInches) -> {
                      System.out.println(pictureType);
                      if (PictureType.UNKNOWN.equals(pictureType)) {
                          return null;
                      }
                      BufferedImage bufferedImage=ImgUtil.toImage(content);
                      String base64Img=ImgUtil.toBase64(bufferedImage, pictureType.getExtension());
                      //  帶圖片的word,則將圖片轉(zhuǎn)為base64編碼,保存在一個(gè)頁(yè)面中
                      StringBuilder sb=(new StringBuilder(base64Img.length() + "data:;base64,".length()).append("data:;base64,").append(base64Img));
                      return sb.toString();
                  });
                  // 解析word文檔
                  wordToHtmlConverter.processDocument(wordDocument);
                  return wordToHtmlConverter.getDocument();
              }
          

          轉(zhuǎn)換成html的效果:

          1.3 使用spire

          public void wordToHtml(String wordPath, String htmlPath) {
                  htmlPath=FileUtil.getNewFileFullPath(wordPath, htmlPath, "html");
                  Document document=new Document();
                  document.loadFromFile(wordPath);
                  document.saveToFile(htmlPath, FileFormat.Html);
              }
          

          轉(zhuǎn)換成html的效果:

          因?yàn)槭褂玫氖敲赓M(fèi)版,存在頁(yè)數(shù)和字?jǐn)?shù)限制,需要完整功能的的可以選擇付費(fèi)版本。PS:這回76頁(yè)的文檔居然轉(zhuǎn)成功了前50頁(yè)。

          2、將pdf文件轉(zhuǎn)換成html文件

          圖片版pdf原文件效果:

          文字版pdf原文件效果:

          2.1 使用aspose

          public static void pdfToHtml(String pdfPath, String htmlPath) throws IOException, ParserConfigurationException {
                  File file=new File(pdfPath);
                  String path=htmlPath + File.separator + file.getName().substring(0, file.getName().lastIndexOf(".")) + ".html";
                  PDDocument document=PDDocument.load(new File(pdfPath));
                  Writer writer=new PrintWriter(path, "UTF-8");
                  new PDFDomTree().writeText(document, writer);
                  writer.close();
                  document.close();
              }
          

          圖片版PDF文件驗(yàn)證結(jié)果:

          文字版PDF文件驗(yàn)證結(jié)果:

          2.2 使用poi + pdfbox

          public void pdfToHtml(String pdfPath, String htmlPath) throws IOException, ParserConfigurationException {
                  String path=FileUtil.getNewFileFullPath(pdfPath, htmlPath, "html");
                  PDDocument document=PDDocument.load(new File(pdfPath));
                  Writer writer=new PrintWriter(path, "UTF-8");
                  new PDFDomTree().writeText(document, writer);
                  writer.close();
                  document.close();
              }
          

          圖片版PDF文件驗(yàn)證結(jié)果:

          文字版PDF原文件效果:

          2.3 使用spire

          public void pdfToHtml(String pdfPath, String htmlPath) throws IOException, ParserConfigurationException {
                  htmlPath=FileUtil.getNewFileFullPath(pdfPath, htmlPath, "html");
                  PdfDocument pdf=new PdfDocument();
                  pdf.loadFromFile(pdfPath);
                  pdf.saveToFile(htmlPath, com.spire.pdf.FileFormat.HTML);
              }
          

          圖片版PDF文件驗(yàn)證結(jié)果:
          因?yàn)槭褂玫氖敲赓M(fèi)版,所以只有前三頁(yè)是正常的。。。有超過(guò)三頁(yè)需求的可以選擇付費(fèi)版本。

          文字版PDF原文件效果:

          報(bào)錯(cuò)了無(wú)法轉(zhuǎn)換。。。

          java.lang.NullPointerException
          	at com.spire.pdf.PdfPageWidget.spr┢?(Unknown Source)
          	at com.spire.pdf.PdfPageWidget.getSize(Unknown Source)
          	at com.spire.pdf.PdfPageBase.spr???—(Unknown Source)
          	at com.spire.pdf.PdfPageBase.getActualSize(Unknown Source)
          	at com.spire.pdf.PdfPageBase.getSection(Unknown Source)
          	at com.spire.pdf.general.PdfDestination.spr︻┎?—(Unknown Source)
          	at com.spire.pdf.general.PdfDestination.spr┻┑?—(Unknown Source)
          	at com.spire.pdf.general.PdfDestination.getElement(Unknown Source)
          	at com.spire.pdf.primitives.PdfDictionary.setProperty(Unknown Source)
          	at com.spire.pdf.bookmarks.PdfBookmark.setDestination(Unknown Source)
          	at com.spire.pdf.bookmarks.PdfBookmarkWidget.spr┭┘?—(Unknown Source)
          	at com.spire.pdf.bookmarks.PdfBookmarkWidget.getDestination(Unknown Source)
          	at com.spire.pdf.PdfDocumentBase.spr??(Unknown Source)
          	at com.spire.pdf.widget.PdfPageCollection.spr┦?(Unknown Source)
          	at com.spire.pdf.widget.PdfPageCollection.removeAt(Unknown Source)
          	at com.spire.pdf.PdfDocumentBase.spr┞?(Unknown Source)
          	at com.spire.pdf.PdfDocument.loadFromFile(Unknown Source)
          

          3、將excel文件轉(zhuǎn)換成html文件

          excel原文件效果:

          3.1 使用aspose

          public void excelToHtml(String excelPath, String htmlPath) throws Exception {
                  htmlPath=FileUtil.getNewFileFullPath(excelPath, htmlPath, "html");
                  Workbook workbook=new Workbook(excelPath);
                  com.aspose.cells.HtmlSaveOptions options=new com.aspose.cells.HtmlSaveOptions();
                  workbook.save(htmlPath, options);
              }
          

          轉(zhuǎn)換成html的效果:

          3.2 使用poi

          public void excelToHtml(String excelPath, String htmlPath) throws Exception {
                  String path=FileUtil.getNewFileFullPath(excelPath, htmlPath, "html");
                  try(FileOutputStream fileOutputStream=new FileOutputStream(path)){
                      String htmlStr=excelToHtmlStr(excelPath);
                      byte[] bytes=htmlStr.getBytes();
                      fileOutputStream.write(bytes);
                  }
              }
          
          
              public String excelToHtmlStr(String excelPath) throws Exception {
                  FileInputStream fileInputStream=new FileInputStream(excelPath);
                  try (Workbook workbook=WorkbookFactory.create(new File(excelPath))){
                      DataFormatter dataFormatter=new DataFormatter();
                      FormulaEvaluator formulaEvaluator=workbook.getCreationHelper().createFormulaEvaluator();
                      org.apache.poi.ss.usermodel.Sheet sheet=workbook.getSheetAt(0);
                      StringBuilder htmlStringBuilder=new StringBuilder();
                      htmlStringBuilder.append("<html><head><title>Excel to HTML using Java and POI library</title>");
                      htmlStringBuilder.append("<style>table, th, td { border: 1px solid black; }</style>");
                      htmlStringBuilder.append("</head><body><table>");
                      for (Row row : sheet) {
                          htmlStringBuilder.append("<tr>");
                          for (Cell cell : row) {
                              CellType cellType=cell.getCellType();
                              if (cellType==CellType.FORMULA) {
                                  formulaEvaluator.evaluateFormulaCell(cell);
                                  cellType=cell.getCachedFormulaResultType();
                              }
                              String cellValue=dataFormatter.formatCellValue(cell, formulaEvaluator);
                              htmlStringBuilder.append("<td>").append(cellValue).append("</td>");
                          }
                          htmlStringBuilder.append("</tr>");
                      }
                      htmlStringBuilder.append("</table></body></html>");
                      return htmlStringBuilder.toString();
                  }
              }
          

          轉(zhuǎn)換成html的效果:

          3.3 使用spire

          public void excelToHtml(String excelPath, String htmlPath) throws Exception {
                  htmlPath=FileUtil.getNewFileFullPath(excelPath, htmlPath, "html");
                  Workbook workbook=new Workbook();
                  workbook.loadFromFile(excelPath);
                  workbook.saveToFile(htmlPath, com.spire.xls.FileFormat.HTML);
              }
          

          轉(zhuǎn)換成html的效果:

          四、總結(jié)

          從上述的效果展示我們可以發(fā)現(xiàn)其實(shí)轉(zhuǎn)成html效果不是太理想,很多細(xì)節(jié)樣式?jīng)]有還原,這其實(shí)是因?yàn)檫@類轉(zhuǎn)換往往都是追求目標(biāo)是通過(guò)使用文檔中的語(yǔ)義信息并忽略其他細(xì)節(jié)來(lái)生成簡(jiǎn)單干凈的 HTML,所以在轉(zhuǎn)換過(guò)程中復(fù)雜樣式被忽略,比如居中、首行縮進(jìn)、字體,文本大小,顏色。舉個(gè)例子在轉(zhuǎn)換是 會(huì)將應(yīng)用標(biāo)題 1 樣式的任何段落轉(zhuǎn)換為 h1 元素,而不是嘗試完全復(fù)制標(biāo)題的樣式。所以轉(zhuǎn)成html的顯示效果往往和原文檔不太一樣。這意味著對(duì)于較復(fù)雜的文檔而言,這種轉(zhuǎn)換不太可能是完美的。但如果都是只使用簡(jiǎn)單樣式文檔或者對(duì)文檔樣式不太關(guān)心的這種方式也不妨一試。

          PS:如果想要展示效果好的話,其實(shí)可以將上篇文章《文檔在線預(yù)覽(一)通過(guò)將txt、word、pdf轉(zhuǎn)成圖片實(shí)現(xiàn)在線預(yù)覽功能》說(shuō)的內(nèi)容和本文結(jié)合起來(lái)使用,即將文檔里的內(nèi)容都生成成圖片(很可能是多張圖片),然后將生成的圖片全都放到一個(gè)html頁(yè)面里 ,用html+css來(lái)保持樣式并實(shí)現(xiàn)多張圖片展示,再將html返回。開源組件kkfilevie就是用的就是這種做法。

          kkfileview展示效果如下:

          下圖是kkfileview返回的html代碼,從html代碼我們可以看到kkfileview其實(shí)是將文件(txt文件除外)每頁(yè)的內(nèi)容都轉(zhuǎn)成了圖片,然后將這些圖片都嵌入到一個(gè)html里,再返回給用戶一個(gè)html頁(yè)面。


          主站蜘蛛池模板: 在线免费视频一区| 亚洲午夜在线一区| 欧美人妻一区黄a片| 日本一区二区三区四区视频| 国产精品亚洲一区二区三区| 免费一区二区三区| 精品无码人妻一区二区三区不卡| 影音先锋中文无码一区| 久久久无码一区二区三区| 久99精品视频在线观看婷亚洲片国产一区一级在线 | 精品一区二区视频在线观看 | 成人一区专区在线观看| 久久精品一区二区三区AV| 国产成人精品无码一区二区| 三上悠亚国产精品一区| 一区二区三区影院| 日韩人妻无码一区二区三区| 中文字幕亚洲一区二区三区| 国产免费伦精品一区二区三区| 波多野结衣一区二区三区高清av| 无码人妻精一区二区三区| 亚洲精品无码一区二区| 海角国精产品一区一区三区糖心 | 四虎在线观看一区二区| 久久久无码精品人妻一区| 成人无号精品一区二区三区| 国产麻豆精品一区二区三区| 国产精品无码一区二区在线 | 亚洲福利秒拍一区二区| 成人精品一区二区户外勾搭野战| 亚洲视频一区二区三区| 亚洲中文字幕久久久一区| 成人一区二区三区视频在线观看| 深田咏美AV一区二区三区| 免费看AV毛片一区二区三区| 性色AV 一区二区三区| 中文字幕精品一区| 2022年亚洲午夜一区二区福利 | 一区二区不卡久久精品| 国产在线视频一区二区三区98 | 亚洲av无码一区二区三区天堂|