Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesSome links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To embed a PDF with Adobe PDF Embed API, register your website, obtain a client ID, load Adobe’s viewer SDK, add a viewer container, wait for adobe_dc_view_sdk.ready, and call previewFile() with a PDF URL (or an ArrayBuffer promise) and a file name. The complete starter below runs as a single HTML page once you replace the client ID and serve it from the registered domain.
What you need before you start
- A website domain that you can register with Adobe for the API client ID.
- An HTML page and the normal browser-based web development tools you already use. Adobe says there are no special environment setup steps or system requirements. See the official PDF Embed API documentation for current account and browser details.
- A PDF available at a URL, or code that can provide its bytes as an ArrayBuffer.
The API is free to use according to Adobe’s product information. You still need to follow your own PDF hosting, authentication, privacy, and bandwidth policies.
Get a client ID and register the domain
- Open Adobe’s PDF Embed API developer console and create an application for the PDF Embed API.
- Enter the exact website domain where the viewer will run. Register the production domain and any development hostname you will actually use, such as
localhostif Adobe allows it for your application. - Copy the generated client ID. Keep it in your page configuration, but do not treat it as a secret: the browser must receive it. Protect the PDF itself with your server’s access controls if it is private.
- When the page first renders, Adobe validates the client ID against the current domain. An incorrect ID or a domain mismatch prevents the preview from loading.
Test the page from the registered origin rather than opening it directly as a file:// URL. A small local HTTP server is usually enough, for example python -m http.server 8000, provided that the hostname and port are registered as required by your Adobe application.
Run the official demo first
Adobe’s online demo lets you experiment with viewer configuration and includes a generate-code control. Start with a public PDF and change one option at a time. Adobe also publishes ready-to-run samples; a successful test is one in which the PDF renders in the web viewer. This isolates credential and browser problems before you integrate your own application.
#1 Best Overall
- 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 HTML example
Save this as index.html, replace YOUR_CLIENT_ID, and serve it from the registered domain. The file name in metaData is mandatory even when the PDF URL already ends in .pdf.
<!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>
html, body { margin: 0; min-height: 100%; }
#adobe-dc-view { width: 100%; height: 800px; }
</style>
</head>
<body>
<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-demo/PDFs/Bodea Brochure.pdf"
}
},
metaData: {
fileName: "Bodea Brochure.pdf"
}
}, {
embedMode: "SIZED_CONTAINER"
});
});
</script>
</body>
</html>
The sequence matters: load viewer.js, wait for the SDK-ready event, construct AdobeDC.View, then call previewFile. A fixed height is supplied because a sized container needs dimensions in the surrounding layout.
Choose the right embed mode
Pass embedMode in the configuration object. Adobe documents four modes; the best choice depends on whether the PDF is the page or one component of it.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →| Mode | Layout behavior | Good fit | Implementation consideration |
|---|---|---|---|
FULL_WINDOW |
Uses the full viewing area and exposes viewer controls. | A dedicated document-reading screen. | Phone annotation tools are not supported in this mode; tablet support is different (see mobile limits below). |
SIZED_CONTAINER |
Renders inside a bounded box. | Product pages, dashboards, presentations, and predictable layouts. | Set an explicit container width and height, as in the sample. |
IN_LINE |
Places all PDF pages inline with the surrounding content and sizes the viewer to the document. | Whitepapers, brochures, e-books, and long-form reading pages. | Reserve enough page width and account for the document’s total vertical space. |
LIGHT_BOX |
Shows the PDF in the foreground while the page remains visible behind it. | “Read PDF” buttons, previews, and overlays. | Provide a clear open and close control in your surrounding UI. |
For example, an inline configuration can be as small as:
Rank #2
- 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.
adobeDCView.previewFile({
content: { location: { url: pdfUrl } },
metaData: { fileName: "whitepaper.pdf" }
}, { embedMode: "IN_LINE" });
Configure viewer controls
Adobe’s how-to documentation shows configuration for download, print, annotation, full screen, search, and form filling. Form filling is enabled by default. Disable it when the document is informational rather than interactive:
const viewerConfig = {
embedMode: "SIZED_CONTAINER",
showDownloadPDF: true,
showPrintPDF: true,
showAnnotationTools: true,
showFullScreen: true,
enableFormFilling: false
};
adobeDCView.previewFile(fileConfig, viewerConfig);
Use the control names supported by the current Adobe documentation and test them in every mode you ship. A control that is useful on desktop may be unavailable on a phone, and your page should not depend on a hidden control for essential navigation.
Supply a PDF URL or an ArrayBuffer
Public or server-authorized URL
The starter uses content.location.url. The browser must be able to retrieve that URL, and your server must permit the request under its CORS and authentication rules. A PDF URL that only works in your backend will not work directly in the browser.
File promise for fetched bytes
Adobe also accepts a file promise resolving to an ArrayBuffer. This is useful when your application obtains a short-lived authorization token or fetches the document through its own API:
Rank #3
- 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
const filePromise = fetch("/api/report.pdf", {
headers: { Authorization: "Bearer YOUR_TOKEN" }
}).then((response) => {
if (!response.ok) throw new Error(`PDF request failed: ${response.status}`);
return response.arrayBuffer();
});
const fileConfig = {
content: { promise: () => filePromise },
metaData: { fileName: "report.pdf" }
};
adobeDCView.previewFile(fileConfig, { embedMode: "SIZED_CONTAINER" });
The file name remains mandatory. If both a URL and a promise are supplied, Adobe says the promise is used and the URL is ignored, so do not assume the URL is a fallback.
Browser and mobile support
Adobe lists the latest 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, so check Adobe’s current support page when you have a strict compatibility requirement.
- On phones, annotation tools are not supported in
FULL_WINDOWmode. Adobe documents annotation support on Android and iOS tablets. - Print functionality is unsupported on mobile.
- PDF download is unsupported on iOS but supported on Android.
Design a mobile fallback: keep the document readable without print or download, provide an ordinary server-side download link when your policy permits it, and test a tablet separately from a phone.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchTroubleshooting common failures
“The viewer does not render” or a client-ID error
Confirm that the page is served from the exact registered domain, that the ID has no extra whitespace, and that viewer.js loaded successfully. Check the browser console and network panel. Opening the file from disk, using an unregistered staging hostname, or copying an ID from another Adobe application are common causes.
Rank #4
- 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.
The SDK-ready handler never runs
Verify the script URL, remove content-security-policy rules that block it, and register the event listener before or immediately after loading the SDK. A browser extension or network filter can also block the script; test in a clean browser profile.
A blank viewer or failed PDF request
Open the PDF URL directly in the same browser session and inspect its response. The endpoint must return the PDF bytes, not an HTML login page, and your server must allow the browser request. For a promise, check that the function resolves to an ArrayBuffer and that non-2xx responses throw an error.
The document appears but controls are missing
Check the selected embed mode, the viewer configuration flags, and the device limitations. Do not diagnose a missing mobile print or iOS download control as a JavaScript bug.
Inline layout is too tall or a bounded viewer is clipped
For SIZED_CONTAINER, set a deliberate height and width on the container and test responsive breakpoints. For IN_LINE, allow the document’s pages to flow naturally and avoid a parent with restrictive overflow rules.
Best Value
- 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
Security, performance, and operational details
Protect documents without exposing credentials
The client ID identifies the web application; it is not a substitute for PDF authorization. Use short-lived, server-authorized URLs or the file-promise pattern for private documents, and avoid putting bearer tokens in query strings. Apply your normal access logging and retention rules.
Keep first render predictable
Load the SDK once, instantiate one viewer per container, and avoid starting several large PDF fetches at the same time on a slow connection. Give the container a stable size to prevent layout shifts. If you use an inline document, warn users that a long PDF creates a long page.
Test the cases that fail in production
- Wrong and unregistered hostnames, including staging and preview deployments.
- Expired authorization and a PDF endpoint that returns a login page.
- Large and form-enabled PDFs.
- Desktop browsers, phone browsers, and tablets.
- Content-security-policy, CORS, ad-blocking, and slow-network conditions.
Or skip the browser setup
If your goal is to create a rendered image or PDF of a web page rather than embed an interactive PDF reader, ScreenshotNeo provides a single screenshot API call. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.
cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
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}`);
See the ScreenshotNeo documentation for options and response headers. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to try it.
Adobe PDF Embed API FAQ
Does the PDF file name really matter?
Yes. Adobe documents metaData.fileName as mandatory metadata, even when the content is supplied by URL or promise.
Can I provide both a URL and a promise?
You can, but Adobe says the promise takes precedence and the URL is ignored.
Which mode is best for a brochure inside an article?
IN_LINE is the documented fit for brochures and similar reading applications; use LIGHT_BOX when the reader should open the document over the existing page instead.

