Front-end vue3 implements local and online file preview (including pdf/txt/mp3/mp4/docx/xlsx/pptx)

1. Only online preview is required, and the file address is accessible from the public network (1) Free preview of Microsoft office (recommended) Supports free preview of multiple office file formats such as doc/docx/xls/xlsx/ppt/pptx //Sample code //? Splice the address that needs to be previewed after https://view.officeapps.live.com/op/view.aspx?src=, as follows:\ let url=”http://xxx.com/files/demo.doc” window.open(“?https://view.officeapps.live.com/op/view.aspx?src=” + encodeURIComponent(?url)) (2) […]

Vue does docx/pdf/excle file preview

1. excel preview Method 1: Use xlsx plug-in ①Introduce xlsx npm install xlsx Page reference dependency import * as XLSX from ‘xlsx’ Using this kind of reference can solve the problem of version inconsistency in the import method of import XLSX from ‘xlsx’. ②Code View excel sheet Get the contents of the table //Call event […]

javafx – automatically download articles and convert doc to docx

package sample.main.anli; import com.jacob.com.ComThread; import com.jacob.com.Variant; import com.spire.doc.DocumentObject; import com.spire.doc.FileFormat; import javafx.application.Application; import javafx.application.Platform; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXML; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.TextField; import javafx.scene.input.MouseEvent; import javafx.scene.layout.Background; import javafx.scene.layout.GridPane; import javafx.scene.text.Text; import javafx.scene.web.WebView; import javafx.stage.Stage; import org.apache.poi.poifs.filesystem.DirectoryEntry; import org.apache.poi.poifs.filesystem.DocumentEntry; import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.jsoup.Jsoup; import org.w3c.dom.Document; import java.io.*; import […]

Java realizes the conversion of docx, doc, xlsx, xls, ppt files into pdf files

1. The following jar packages need to be imported <!–word to pdf–> <dependency> <groupId>com.aspose</groupId> <artifactId>aspose-words</artifactId> <version>15.8.0</version> </dependency> <!–xlsx or xls to pdf–> <dependency> <groupId>com.aspose</groupId> <artifactId>aspose-cells</artifactId> <version>8.5.2</version> </dependency> <!–ppt to pdf–> <dependency> <groupId>com.aspose</groupId> <artifactId>aspose-slides</artifactId> <version>19.6</version> </dependency> 2. Remove watermark files 3. Once you are ready, start the actual operation (1), first is the conversion operation of […]

OCX adds methods and events, HTML calls ocx functions and callbacks, and ocx calls dll VS2017

ocx adding method Right-click on XXXXXlib at the end of the class view and click Add to add a method. Other default Add event Right-click the XXXXX at the end of the class view and click Add to add an event. In this way, ocx can be compiled. #include <iostream> #include <string> #include <comutil.h> CMFCActiveXControlSmartPosCtrl* […]

vue supports txt, docx, xlsx, mp4 format file preview (pure front-end)

Foreword In daily work, we have already encountered the function of previewing files after uploading them, such as docx, doc, xls, xlsx, ppt, pdf, txt, pictures, videos and other formats. In fact, back-end personnel can also write interfaces Analysis, in line with the mentality of not wanting to trouble others, if you can solve it […]

tinymce editor imports the full version of docx and doc format Word documents

Something to note before reading this article On the front end, I import a Word document and automatically parse it into HTML and then insert it into the tinymce editor. Here I use mammoth.js to identify the Word content and set it into the editor. Mammoth can only parse Word in .docx format. The current […]

Use poi to read the closest table data under a certain text in doc and docx

Share a method of using poi to read the closest table data under a certain text in doc and docx Introduce the following packages Since I use other functions of easyexcel, I quoted this package. This package contains the package for operating docx. <!– Alibaba Cloud easyexcel –> <dependency> <groupId>com.alibaba</groupId> <artifactId>easyexcel</artifactId> <version>3.1.3</version> </dependency> <!– Operation […]