Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To embed a PDF with Adobe PDF Embed API, register your website to obtain a client ID, load Adobe’s viewer SDK, add a viewer container, wait for adobe_dc_view_sdk.ready, create an AdobeDC.View instance, and call previewFile with a PDF URL (or an ArrayBuffer promise) plus the required file name metadata. The complete starter below runs in a normal web page with no special build system.

What you need before coding

  • A website domain where the viewer will run.
  • An Adobe PDF Embed API client ID registered for that domain. Adobe validates the ID against the page’s domain after the first render; a wrong ID or domain mismatch prevents the preview.
  • A PDF reachable by the browser, either at a URL or through code that returns an ArrayBuffer.
  • Your existing HTML, CSS and JavaScript tools. Adobe’s quick start says there are no additional environment setup steps or system requirements.

The API is a free JavaScript developer tool according to Adobe’s product information. Browser support is described in terms of current versions, so verify Adobe’s support page when you must certify a particular browser matrix.

Get a client ID and try the demo

Register the domain

  1. Open Adobe’s PDF Embed API developer registration flow and create a project.
  2. Enter the exact website domain on which the viewer will execute. Treat subdomains and local development hosts as separate origins unless Adobe’s registration screen explicitly accepts them together.
  3. Copy the generated client ID. Keep it available to the page that creates AdobeDC.View; do not substitute an unrelated Adobe credential.

If the ID is valid but registered for another host, the SDK can load while the document preview is blocked during domain validation. Test from the registered origin rather than opening a file directly with a file:// URL.

Use Adobe’s interactive demo

Adobe’s online demo lets you change viewer configuration and generate corresponding code. It is useful for deciding which controls and display mode fit your page before you copy a minimal integration. Adobe also publishes ready-to-run samples; a successful sample is one in which a PDF renders in the web viewer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
  • Create and edit PDFs. Collaborate with ease. E-sign documents and collect signatures. Get everything done in one app, wherever you go.
  • Edit text and images without jumping to another app.
  • E-sign documents or request e-signatures on any device. Recipients don’t need to log in to e-sign.
  • Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
  • Share PDFs for collaboration. Commenting features make it easy for reviewers to comment, mark up, and annotate.

Minimal working integration

Save this as index.html, replace <YOUR_CLIENT_ID>, and replace the example PDF URL with a URL your browser can fetch. Serve the file through a local or hosted HTTP server from a registered domain; do not rely on a local file:// launch for final validation.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Adobe PDF Embed API example</title>
  <style>
    #adobe-dc-view { width: 100%; height: 720px; }
  </style>
</head>
<body>
  <h1>Product guide</h1>
  <div id="adobe-dc-view"></div>

  <script src="https://acrobatservices.adobe.com/view-sdk/viewer.js"></script>
  <script>
    document.addEventListener("adobe_dc_view_sdk.ready", function () {
      const adobeDCView = new AdobeDC.View({
        clientId: "<YOUR_CLIENT_ID>",
        divId: "adobe-dc-view"
      });

      adobeDCView.previewFile({
        content: {
          location: {
            url: "https://acrobatservices.adobe.com/view-sdk/PDFs/Bodea Brochure.pdf"
          }
        },
        metaData: {
          fileName: "Bodea Brochure.pdf"
        }
      });
    });
  </script>
</body>
</html>

The essential sequence is deliberate: load viewer.js, wait for the SDK-ready event, construct AdobeDC.View with the client ID and container ID, then call previewFile. The PDF file name in metaData is mandatory even when the content is supplied by URL.

Serve and verify the page

  1. Start your normal development server (for example, the server supplied by your framework).
  2. Open the page at the registered host and browser.
  3. Open developer tools and confirm that viewer.js loads, the ready event fires, and the PDF request returns successfully.
  4. Confirm that the viewer toolbar and pages appear inside #adobe-dc-view.

Cross-origin PDF delivery must also be permitted by the PDF host. If the browser cannot fetch the document because of CORS or authentication, use a server endpoint you control or the file-promise method below.

Supply a URL or an ArrayBuffer

URL-based content

Use content.location.url when the browser can retrieve the PDF directly. The URL must identify the document, while metaData.fileName supplies the name Adobe requires for viewer operations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

File-promise content

For protected files or a PDF fetched by your application, provide a file promise that resolves to an ArrayBuffer. Adobe’s how-to describes content as either a path/URL or a file promise. If both are supplied, Adobe says the promise is used and the URL is ignored.

Rank #2
Sale
Adobe Acrobat Studio | PDF Software | Create and edit PDF’s with AI Insights | 12-Month License | PC/MAC Online Code | Activation Required
  • Transform static files into dynamic workspaces with instant answers and insights using PDF Spaces.
  • Generate new ideas, summarize information, and get next steps with pre-built or customized assistants.
  • Effortlessly create standout content using Adobe Express templates, creative assets, and design tools that bring your content to life.
  • Create, organize, edit, and sign your documents with a complete set of PDF tools.
  • Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
document.addEventListener("adobe_dc_view_sdk.ready", async function () {
  const adobeDCView = new AdobeDC.View({
    clientId: "<YOUR_CLIENT_ID>",
    divId: "adobe-dc-view"
  });

  const filePromise = fetch("/api/reports/annual-report.pdf", {
    credentials: "include"
  }).then(response => {
    if (!response.ok) throw new Error(`PDF request failed: ${response.status}`);
    return response.arrayBuffer();
  });

  adobeDCView.previewFile({
    content: { promise: filePromise },
    metaData: { fileName: "annual-report.pdf" }
  });
});

Keep authorization and entitlement checks on your server. The browser still needs a complete PDF byte stream, and the promise must resolve to an ArrayBuffer, not a JSON response or a Blob left unconverted.

Choose the right embed mode

Adobe documents four display modes. The mode affects page flow and how much space the viewer occupies; it does not change the requirement for a client ID or file metadata.

Mode Layout behavior Good fit Implementation note
FULL_WINDOW Uses the full viewing area and can expose viewer controls. Dedicated document-reading screens. Plan for a viewer that takes over the available window.
SIZED_CONTAINER Renders in a bounded box. Dashboards, product pages and presentations with fixed placement. Give the container explicit width and height.
IN_LINE Places all PDF pages inline with surrounding content and sizes viewer height to the document. Whitepapers, brochures, e-books and long-form reading pages. Reserve enough page-flow space; very long documents can make the page tall.
LIGHT_BOX Shows the PDF in the foreground while the page background remains visible. “Read document” buttons and secondary previews. Provide a clear open and close interaction.

Configure a mode through the preview configuration object. For a sized container, keep the CSS dimensions stable before calling previewFile.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
adobeDCView.previewFile(
  {
    content: {
      location: { url: "https://example.com/guide.pdf" }
    },
    metaData: { fileName: "guide.pdf" }
  },
  {
    embedMode: "SIZED_CONTAINER",
    showDownloadPDF: true,
    showPrintPDF: true,
    showAnnotationTools: true,
    showFullScreen: true,
    showSearch: true,
    enableFormFilling: true
  }
);

Adobe’s how-to documents controls for download, printing, annotations, full screen, search and form filling. Form filling is enabled by default; set enableFormFilling: false when the document should not be completed in the viewer. Expose only the controls your audience needs, especially when download or print conflicts with your document policy.

Browser and mobile behavior

Adobe lists current versions of Edge, Chrome and Firefox on Windows; Safari, Chrome, Edge and Firefox on macOS; Chrome on Android; and Safari and Chrome on iOS. “Latest” changes over time, so check Adobe’s current compatibility page before promising support for an older browser or embedded webview.

Rank #3
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
  • Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.
  • EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
  • READ and Comment on PDFs – Intuitive reading modes & document commenting and mark up tools!
  • CREATE, COMBINE, SCAN and COMPRESS PDFs.
  • FILL forms & Digitally Sign PDFs. Work with Digital certificates
  • On phones, annotation tools are not supported in FULL_WINDOW mode. Adobe says annotations are supported on Android and iOS tablets.
  • Print is unsupported on mobile.
  • PDF download is unsupported on iOS but supported on Android.

Design mobile layouts around reading rather than desktop toolbar parity. If printing or downloading is essential, provide an alternative workflow that your product can support, and test it on the exact iOS or Android versions you target.

Troubleshooting checklist

The viewer stays blank

  • Check that viewer.js loaded without a Content Security Policy or network error.
  • Verify that your code waits for adobe_dc_view_sdk.ready; constructing AdobeDC.View too early can fail.
  • Confirm that the page contains an element whose ID exactly matches divId, and that it has visible dimensions.

Client ID or domain validation fails

Register the actual origin serving the page and replace the placeholder with that client ID. A deployment host, staging subdomain and production domain may need separate registration. Test from HTTP(S), not a local file URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The PDF request fails

Open the document URL directly and inspect the network response. Fix authentication, CORS, redirects and server permissions. For private documents, fetch the file in your application and pass an ArrayBuffer promise instead of exposing a public URL.

Metadata or content errors appear

Ensure metaData.fileName is present and includes a sensible extension. If both content.location.url and content.promise are set, remember that Adobe uses the promise.

Controls are missing

Review the second configuration argument to previewFile, the selected embed mode and mobile limitations. A control unavailable on a phone cannot be enabled by CSS or by adding a desktop setting.

Rank #4
Adobe Acrobat Pro 2024| PC/Mac Code | Software Download | PDF Software | 3-year term license | non-renewing | Activation Required
  • Work securely offline — without connecting to the cloud — with desktop-only PDF tools.
  • Edit text and images and reorder and delete pages in a PDF.
  • Convert PDFs to Microsoft Word, Excel, or PowerPoint files while preserving fonts, formatting, and layouts.
  • Easily create, fill, and sign forms.
  • Password-protect documents or redact sections of a PDF to keep sensitive information secure.

Performance, security and operational notes

  • Use SIZED_CONTAINER when predictable page geometry matters; use IN_LINE when the PDF is part of the reading flow.
  • Give the viewer a real height before initialization to avoid layout collapse.
  • Fetch private files through an authenticated server route and return only documents the current user may access.
  • Do not place long-lived secrets in client-side JavaScript. The client ID identifies the registered web application; document authorization remains your responsibility.
  • Test large PDFs, slow connections, redirected URLs and expired sessions. A viewer that works with Adobe’s sample file can still fail on your delivery endpoint.

Or skip the browser setup

If your goal is to create a screenshot or PDF artifact rather than provide an interactive reader, ScreenshotNeo offers a one-request website capture API. It accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each cleanup step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response reports the result in X-Page-Verdict and X-Billed headers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the API documentation at https://screenshotneo.com/docs/ for all options. A basic call is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

You can also use Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Or Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. Features include full-page lazy-image loading, CSS-selector element capture, dark mode, 12 device presets plus custom viewports, retina scale, PDF paper and page controls, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agent, authorization, timezone, geolocation, transparent backgrounds, resizing, configurable caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. The parameter names used by other screenshot APIs also work for easier migration.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots; yearly billing provides two months free, and every feature is available on every plan. Create a free ScreenshotNeo account.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Adobe PDF Embed API FAQ

Does the PDF Embed API require a paid Adobe account?

Adobe describes the API as free to use. You still need a registered client ID and must follow Adobe’s current account and domain-registration process.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I embed a PDF without making its URL public?

Yes. Fetch it through an authorized application endpoint and provide the resulting ArrayBuffer through a file promise. This keeps access checks in your application instead of relying on a public document URL.

Best Value
Adobe Acrobat Standard | 12-Month Subscription with Auto-Renewal | PDF Software | Convert, Edit, E-Sign, Protect |PC/Mac Download | Activation Required
  • Create PDF's: Convert any Office file, image, or web page into a high-quality PDF that looks great on any device — desktop, tablet, or smartphone.
  • Convert PDF's: Work seamlessly with PDF files, right inside Microsoft 365. You can convert your files with the built-in PDF converter or work with Microsoft 365 files in Acrobat.
  • Edit PDF's: Change text and images without leaving your PDF. With Acrobat, it’s easy to edit PDF documents from anywhere, on any mobile device.
  • Share PDF's: PDF sharing and reviewing is easy. You can share a link and then review and manage all your feedback online or from your mobile device in one organized place.
  • Sign PDF's: Share, track, and manage all your signed documents virtually from anywhere

Which mode should I use for a brochure page?

IN_LINE is the documented fit for brochures and similar reading applications because the pages appear with the surrounding content.

Why does a phone show fewer viewer capabilities?

Adobe documents mobile-specific limits: phone annotation tools are unavailable in Full Window mode, printing is unsupported on mobile, and iOS does not support PDF download.

Frequently Asked Questions

Can I use an ArrayBuffer and a URL together?

You can supply both, but Adobe states that the file promise is used and the URL is ignored when both are present.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What must the PDF metadata contain?

The metaData.fileName value is mandatory, even when the PDF comes from a URL.

Quick Recap

Bestseller No. 1
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
Edit text and images without jumping to another app.; Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
$239.88
SaleBestseller No. 2
Adobe Acrobat Studio | PDF Software | Create and edit PDF’s with AI Insights | 12-Month License | PC/MAC Online Code | Activation Required
Adobe Acrobat Studio | PDF Software | Create and edit PDF’s with AI Insights | 12-Month License | PC/MAC Online Code | Activation Required
Create, organize, edit, and sign your documents with a complete set of PDF tools.; Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
$209.99
Bestseller No. 3
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.; EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
$99.99
Bestseller No. 4
Adobe Acrobat Pro 2024| PC/Mac Code | Software Download | PDF Software | 3-year term license | non-renewing | Activation Required
Adobe Acrobat Pro 2024| PC/Mac Code | Software Download | PDF Software | 3-year term license | non-renewing | Activation Required
Work securely offline — without connecting to the cloud — with desktop-only PDF tools.
$324.00
Bestseller No. 5

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.