Skip to content

helms-charity/dc-view-sdk-samples

 
 

Repository files navigation

Getting started with the Adobe Document Services PDF Embed API

The Adobe Document Services PDF Embed API lets you display PDF files in your website and leverage its power to benefit your users.

Prerequisites

Before you can work with the PDF Embed API, you must register your application and get Client Id (API Key). Request Access to get your own Client Id.

Supported Platforms

  1. Windows - Chrome, Firefox, Edge, IE11+
  2. Mac - Chrome, Firefox, Safari
  3. Android - Chrome
  4. iOS - Chrome, Safari

Running the samples

The following sub-sections describe how to run the samples.

PDF Preview

PDF viewer fills the entire browser window to provide full immersive view for users to read and act on documents. To see it in action, copy the files in the Full Window Embed Mode folder to your computer, and open index.html in a supported browser.

Sized Container Embed Mode

PDF viewer is embedded in the sized container in slideshow and landscape mode. To see it in action, copy the files in the Sized Container Embed Mode folder to your computer, and open index.html in a supported browser.

In-Line Embed Mode

PDF viewer is embedded in line within the context of the app / web page. To see it in action, copy the files in the In-Line Embed Mode folder to your computer, and open index.html in a supported browser.

Lightbox Embed Mode

PDF viewer is displayed on top of web page and fills the entire browser window to provide a focused view. Best suited for content websites, content portals and email. To see it in action, copy the files in the Lightbox Embed Mode folder to your computer, and open index.html in a supported browser.

Local PDF file Preview

This sample demonstrates how to render a local PDF file using the PDF Embed API. It will ask you to pick a PDF file from your computer to start the PDF file rendering using the PDF Embed API. To see it in action, copy the files in the More Samples/Work with Local File folder to your computer, and open index.html in a supported browser.

PDF Preview with Annotation tools

PDF viewer will render PDF file along with annotation tools enabled. To see it in action, copy the files in the More Samples/PDF Annotations folder to your computer, and open index.html in a supported browser.

Note that by default if a user saves the PDF file after adding comments, the file is downloaded locally. This sample shows how to change that behavior, in this case taking no action except adding a small delay.

PDF Preview with Annotation APIs

PDF viewer will render PDF file along with annotation tools and APIs enabled. These samples show how to use annotation APIs to add, import, export, update and delete annotations programmatically. To see it in action, copy More Samples/PDF Annotations APIs folder to your computer, and try it out in a supported browser.

PDF Preview with Events

This sample shows how to start receiving events from PDF viewer. To see it in action, copy the files in the More Samples/Capture PDF Embed API Events folder to your computer, and open index.html in a supported browser.

Handle Search Engine Indexing

These samples provide different implementations of how to enable indexing of PDF files displayed using PDF Embed API. To see it in action, copy More Samples/Handle Search Engine Indexing folder to your computer, and try it out in a supported browser.

Viewer APIs

PDF Embed API provides viewer APIs for customizing the user interface and user interactions with the PDF. These samples show how to use these APIs to perform UI customizations programmatically at run-time. To see it in action, copy the files in the More Samples/Viewer APIs folder to your computer, and try it out in a supported browser.

Linearized PDF file Preview

This sample demonstrates how to render a linearized PDF file using the PDF Embed API. To see it in action, copy the files in the More Samples/Linearization folder to your computer, and open index.html in a supported browser.

Save User Preferences

This sample demonstrates how certain user preferences (such as updated annotation colour, and coach mark after selecting any annotation tool) can be saved and remembered in the browser. To see it in action, copy the files in the More Samples/Save User Preferences folder to your computer, and open index.html in a supported browser.

JavaScript Framework Samples

React Samples

These samples demonstrate how to integrate the PDF viewer in a React application. To see it in action, copy More Samples/React Samples folder to your computer, and follow the instructions in React Samples README.

Angular Samples

These samples demonstrate how to integrate the PDF viewer in an Angular application. To see it in action, copy More Samples/Angular Samples folder to your computer, and follow the instructions in Angular Samples README.

Documentation

For detailed documentation, please check https://www.adobe.com/go/dcviewsdk_docs.

Licensing

This project is licensed under the MIT License. See LICENSE for more information.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 60.8%
  • TypeScript 24.2%
  • HTML 9.6%
  • CSS 5.4%