In web development, we often need to browse PDF content online and embed dynamic PDF online. The traditional solution is to install a client PDF reader. If it is on Google, it can be browsed online because it comes with some Plug-ins, such problems were often time-consuming and labor-intensive in the past. This article mainly shares with you a series of PDF plug-in effects implemented using javascript. It can realize online browsing functions without resorting to third-party plug-ins, which is very practical.
PDFobject can help you embed PDF files directly on the page. Sometimes some projects need to embed PDF files dynamically. PDFObject Designed for quick and easy embedding of PDF files, PDFObject uses JavaScript to generate the same standards-compliant tags and then inserts the into your selection of HTML elements. . You can fill the entire browser window, or convert the PDF into a
or other block-level element.
Different from the closed-source PDF browsing plug-in derived from Foxit used by Google Chrome, PDF.js is An open source product based on open HTML5 and JavaScript technology.
pdf.js is a small plug-in mainly used for online reading of PDF documents on the HTML5 platform. It is written based on JavaScript technology and does not require any local technical support.
pdf.js is published by Mozilla Labs. Their goal is to create a universal, standards-based web platform capable of parsing and rendering PDF files, and eventually release a PDF reader extension. There is no doubt that pdf.js will be integrated into Gecko to become Firefox's embedded PDF reader. , but the specific integration timetable has not yet been determined
jsPDF is an open source library that uses Javascript language to generate PDF. You can use it in Firefox plug-ins, server-side scripts or browser scripts. Client Safari and iPhone Safari are the best supported, followed by Opera and Firefox 3 under Windows. IE does not support it yet. .
jQuery Media Plugin is a web media player plug-in based on jQuery, which supports most network multimedia players and multimedia Format, such as: Flash, Windows Media Player, Real Player, Quicktime, MP3, Silverlight, PDF. It automatically replaces the a tag with p according to the current script configuration, and generates object, embed and even iframe codes. As for whether to generate object or embed, jQuery Media will automatically determine according to the current platform, so the compatibility is very good Below This code is jQuery After Media is generated.
Document Viewer is a jQuery plug-in that allows you to view multiple file formats directly on the web page . File formats supported by the document browser: PDF files, text files, codes, images, audio, videos, etc.
Related recommendations:jQuery combined with jQuery.cookie.js plug-in to implement skin changing function example
js plug-in implements image sliding verification code example sharing
A simple and practical js plug-in--Swiper
The above is the detailed content of Several practical js plug-ins for online browsing of PDF files. For more information, please follow other related articles on the PHP Chinese website!