HOME

TheInfoList



OR:

PDF.js is a
JavaScript library A JavaScript library is a library of pre-written JavaScript code that allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. Libraries With the expanded demands for JavaScript, an ea ...
that renders
Portable Document Format Portable Document Format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating systems. ...
(PDF) files using the
web standard Web standards are the formal, non-proprietary standards and other technical specifications that define and describe aspects of the World Wide Web. In recent years, the term has been more frequently associated with the trend of endorsing a set of s ...
s-compliant
HTML5 Canvas The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap. HTML5 Canvas also helps in making 2D games. While the HTML5 canvas off ...
. The project is led by the
Mozilla Corporation The Mozilla Corporation (stylized as moz://a) is a wholly owned subsidiary of the Mozilla Foundation that coordinates and integrates the development of Internet-related applications such as the Firefox web browser, by a global community of ope ...
after
Andreas Gal Andreas Gal is former chief technology officer at Mozilla. He is most notable for his work on several open source projects and Mozilla technologies. Gal was born in Szeged, Hungary and grew up in Lübeck, Germany. During high school he worked on ...
launched it (initially as an experiment) in 2011.


History and application

PDF.js was originally created as an
extension Extension, extend or extended may refer to: Mathematics Logic or set theory * Axiom of extensionality * Extensible cardinal * Extension (model theory) * Extension (predicate logic), the set of tuples of values that satisfy the predicate * E ...
for
Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current and ...
and is included in Firefox since 2012. (version 15), and enabled by default since 2013 (version 19). The project was created to provide a way for viewing PDF documents natively in the web browser, which prevents potential security risks when opening PDF documents outside a browser, as the code for displaying the document is
sandboxed In computer security, a sandbox is a security mechanism for separating running programs, usually in an effort to mitigate system failures and/or software Vulnerability (computing), vulnerabilities from spreading. The isolation metaphor is taken ...
in a browser. Its implementation uses the
Canvas element The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap. HTML5 Canvas also helps in making 2D games. While the HTML5 canvas off ...
from
HTML5 HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
, which allows for fast rendering speeds. PDF.js is used in
Thunderbird Thunderbird, thunder bird or thunderbirds may refer to: * Thunderbird (mythology), a legendary creature in certain North American indigenous peoples' history and culture * Ford Thunderbird, a car Birds * Dromornithidae, extinct flightless birds ...
,
ownCloud ownCloud is an open-source software product for sharing and syncing of files in distributed and federated enterprise scenarios. It allows companies and remote end-users to organize their documents on servers, computers and mobile devices and w ...
,
Nextcloud Nextcloud is a suite of client-server software for creating and using file hosting services. Nextcloud provides functionally similar to Dropbox, Office 365 or Google Drive when used with integrated office suite solutions Collabora Online or Only ...
, and as browser extensions for
Google Chrome Google Chrome is a cross-platform web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS ...
/
Chromium Chromium is a chemical element with the symbol Cr and atomic number 24. It is the first element in group 6. It is a steely-grey, lustrous, hard, and brittle transition metal. Chromium metal is valued for its high corrosion resistance and hardne ...
,
Firefox for Android Firefox for Android is a web browser developed by Mozilla for Android smartphones and tablet computers. As with its desktop version, it uses the Gecko layout engine, and supports features such as synchronization with Firefox Sync, blocking w ...
,
Pale Moon Pale Moon is an open-source web browser with an emphasis on customization; its motto is "Your browser, Your way". There are official releases for Microsoft Windows and Linux, as well as contributed builds for various platforms. Pale Moon origi ...
and
SeaMonkey SeaMonkey is a free and open-source Internet suite. It is the continuation of the former Mozilla Application Suite, based on the same source code, which itself grew out of Netscape Communicator and formed the base of Netscape 6 and Netscape 7. ...
. It can be integrated or embedded in a web or native application to enable PDF rendering and viewing, and allows advanced usages such as
Server-side rendering Server-side scripting is a technique used in web development which involves employing scripts on a web server which produces a response customized for each user's (client's) request to the website. The alternative is for the web server itself ...
. Many web applications, including
Dropbox Dropbox is a file hosting service operated by the American company Dropbox, Inc., headquartered in San Francisco, California, U.S. that offers cloud storage, file synchronization, personal cloud, and Client (computing), client software. Dropb ...
, Slack, and LinkedIn Learning integrate PDF.js to enable previewing PDF documents.


Behavior

According a benchmark by
Mozilla Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, wi ...
, PDF.js is performant for viewing most common PDF files, while it may have some issues with large or 'graphics-heavy' documents. PDF.js supports most of the PDF specifications (including form support or XFA), but some features have not been implemented yet, which may impact rendering behavior depending on the features the document uses. Several
PDF/X PDF/X is a subset of the PDF ISO standard. The purpose of PDF/X is to facilitate graphics exchange, and it therefore has a series of printing-related requirements which do not apply to standard PDF files. For example, in PDF/X-1a all fonts need t ...
or optional PDF features that are not supported in PDF.js include: * ICC Color Profiles * Spot colors *Overprint simulation *Transparency groups (knockout/isolation) *High-fidelity printing The PDF.js contributor community also notes that the browser behavior of PDF.js varies with browser support for PDF.js's required features. Performance and reliability will be the best on Chrome and Firefox, which are fully supported and subject to automated testing.


See also

*
List of PDF software This is a list of links to articles on software used to manage Portable Document Format (PDF) documents. The distinction between the various functions is not entirely clear-cut; for example, some viewers allow adding of annotations, signatures, e ...
* ORBX.js * Shumway *
JavaScript framework A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build an ...
*
JavaScript library A JavaScript library is a library of pre-written JavaScript code that allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. Libraries With the expanded demands for JavaScript, an ea ...


References


External links

* * * * {{Mozilla organisations Cross-platform free software Firefox Free PDF readers Free web software JavaScript libraries Firefox extensions merged to Firefox