How to embed a PDF in a website or an HTML page so it shows on phones too
Quick answer
To embed a PDF that shows on phones too, host it on a page that draws the PDF itself, then paste that page's iframe code into your site. A bare iframe pointed at the .pdf file hands it to the browser's own viewer, and Chrome on Android shows only the file's name and an “Open” button in its place. On Convika, drop the PDF in the box on this page, keep the page free and publish it, then in its Page settings tick “Allow this page to be embedded on other websites” and press “Copy code”: Convika's viewer draws every page inside the frame, on any phone, on every plan.
Free plan: no credit card, PDFs up to 100 MB. Embedding is on every plan.
On this page
- How to embed a PDF in a website in 4 steps
- Embed a PDF in HTML with code: iframe, embed, and object
- Embed a PDF from Google Drive
- Embed a PDF with the Adobe PDF Embed API
- Embed a PDF with PDF.js on your own server
- Embed a PDF in WordPress, Wix, Google Sites, Squarespace, or Notion
- Embedded PDFs compared side by side
- Make the embedded PDF private or not downloadable
- Frequently asked questions
- Sources
A menu, a brochure, a price list, or a report reads best where your visitors already are: inside your page, with nothing to download. Convika turns the PDF into a page that draws itself, so the same frame shows every page on a laptop, an iPhone, and an Android phone. Drop your PDF in the box above to start.
How to embed a PDF in a website in 4 steps
1. Upload the PDF
Drop the PDF on the box at the top of this page. It takes you to PDF upload with the file chosen. Press Get my link. The link is ready in seconds, with no signup, no email, and no card, and it works for 3 minutes: open it on your phone and see what your visitors will see. The box takes PDFs up to 100 MB.
2. Keep the page and publish it
Click Keep this page — free, no card and sign up. The PDF moves into your account as a page. Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, Convika shows Publish free, and under it Publish without the Convika bar, which starts Pro with its free trial: 7 days free, then $12 a month, cancel any time before it ends.
3. Turn on embedding
On the page's screen in Convika, go to Page settings. Under Embedding, tick Allow this page to be embedded on other websites. Convika confirms: “Embedding is allowed. Applies the next time the page is opened.”
4. Copy the code and paste it into your site
Under Embed code, press Copy code. Paste the code where the PDF should appear: into your HTML, or into your site builder's HTML or embed block. It is one line:
<iframe src="https://yourname.convika.page/menu" title="Menu" width="100%" height="600" style="border:0" loading="lazy"></iframe>
The frame fills the width of its column and stands 600 pixels tall. Every page of the PDF scrolls inside it. For a taller frame, change height="600" to a larger number.
Embed a PDF in HTML with code: iframe, embed, and object
Three HTML tags put a PDF file on a page. Each one hands the file to the browser's own PDF viewer, so what a visitor sees depends on their browser:
<iframe src="menu.pdf">is the tag MDN recommends for a PDF. On a computer, the browser's viewer opens in the frame. In Chrome on Android, Chromium's code puts a placeholder in the frame instead: the file's name and an Open button, which opens the PDF in a new tab.<embed src="menu.pdf" type="application/pdf">has no fallback, and MDN says it “offers no advantage for a PDF preview.” On iPhone, a report in WebKit's bug tracker (WebKit is Safari's engine), open since March 2023, reads: “If I embed a multipage PDF only the first page is shown on Safari iOS.”<object data="menu.pdf" type="application/pdf">shows what you put between its tags when the viewer can't draw the file. MDN: “Its children provide fallback content when the resource cannot be displayed.” WordPress builds its own PDF embed with this tag and warns under it: “Most phone and tablet browsers won't display embedded PDFs.”
With <object>, at least a phone gets a link:
<object data="menu.pdf" type="application/pdf" width="100%" height="600">
<a href="menu.pdf">Open the menu (PDF)</a>
</object>
A link still sends the visitor out of your page. Convika's code puts the PDF itself in the frame on every phone: the frame holds a page whose viewer, built on PDF.js and served from the page's own address, draws each page of the PDF as the visitor scrolls, page 1 first.
Embed a PDF from Google Drive
Google's help gives embed code for Google Docs, Sheets, and Slides (File > Share > Publish to web > Embed) and for Forms. That page doesn't mention PDFs or other files uploaded to Drive.
In Google Sites, a PDF in your Drive goes on a page this way:
- Open your site in Google Sites.
- On the right, click Insert, then Drive.
- Choose the PDF, then click Insert.
- At the top right, click Publish.
Google adds that “only people with access will be able to see the file.” For a public site, share the PDF in Drive with General access set to “Anyone with the link”, which Google describes as: “Anyone on the internet who has the link can open the file without signing in to a Google Account.”
On any other site, use a host that gives the PDF its own embed code. A Convika PDF page goes into Google Sites through Insert > Embed too: paste its link or its code. See embed HTML in Google Sites.
Embed a PDF with the Adobe PDF Embed API
Adobe's viewer is a JavaScript library you add to your own page. Adobe's pricing page says “Unlimited access at no charge.” What it takes, from Adobe's developer docs:
- A client ID, tied to your website's domain: “If the client ID is incorrect or you are using it on a domain other than the one you registered, then the PDF preview is blocked with an error message.”
- Your PDF at a URL you host. A PDF on a different domain from your page needs CORS headers.
- A few lines of JavaScript: a
<div>, Adobe'sviewer.js, and apreviewFilecall with your client ID and the PDF's URL.
On phones, Adobe supports “Android - Google Chrome” and “iOS - Safari, Google Chrome”, and says: “Print functionality is unsupported. PDF download is unsupported on iOS devices, but it is supported on Android.” showDownloadPDF: false and showPrintPDF: false turn the download and print buttons off. Views reach Adobe Analytics or Google Analytics 4 when you pass your own IDs.
Embed a PDF with PDF.js on your own server
Mozilla's PDF.js comes with a prebuilt viewer: upload it and your PDF to your server, then open the viewer with ?file= and the PDF's address after it. Mozilla's notes:
- Browsers: “the latest desktop/mobile versions are implied.”
- A PDF on another site: “Not by default, but it is possible.”
- Your own site: “we do ask if you plan to embed the viewer in your own site, that it not just be an unmodified version.”
Convika's PDF page runs PDF.js for you: no viewer to upload, restyle, or keep up to date, and the frame code is ready to copy.
Embed a PDF in WordPress, Wix, Google Sites, Squarespace, or Notion
Each builder takes the code, or the page's link, in its own place. These steps are from each builder's help pages:
| Builder | Where the code goes | Good to know |
|---|---|---|
| WordPress.org | Add a Custom HTML block (type /html), click Edit HTML, paste the code, and press Update | For a user without the unfiltered_html capability, such as a Contributor, WordPress removes <iframe> on save |
| WordPress.com | Click the + Block Inserter, search for “HTML”, and add the Custom HTML block | “Tags like iframe, script, style, form, embed, and object require a paid plan with hosting features activated.” |
| Wix | Add Elements > Embed Code > Popular Embeds > Embed HTML, then Enter Code, paste, and Apply. Or Embed a site, then Enter Website Address and paste the page's link | “Only HTTPS codes and URLs are displayed.” Every Convika page is HTTPS |
| Google Sites | Insert > Embed: paste the page's link, or click Embed code, paste, click Next, then Insert and Publish | “Some websites won't let you add their content to your site.” A Convika page lets you once embedding is on |
| Squarespace | Add block > Embed, click the pencil icon, click Code snippet, and paste into Embed Data | Squarespace hides some embeds while you're logged in, so check the page logged out |
| Notion | Type /embed and press Enter, then paste the page's link, not the code | The link should “start with https not <iframe”. See embed HTML in Notion |
Embedded PDFs compared side by side
| Convika | Google Drive in Google Sites | Adobe PDF Embed API | PDF.js on your server | |
|---|---|---|---|---|
| Every page shows in the page on phones | Yes: its viewer draws them in the frame | Google doesn't say | Supported: Chrome on Android; Safari and Chrome on iOS | “the latest desktop/mobile versions are implied” |
| What you set up | A free account; copy one line of code | A Google Sites site and the PDF in your Drive | A client ID for your domain, a host for the PDF, and JavaScript | A server for the viewer and the PDF |
| Visitor signs in | No | No, with “Anyone with the link” | Adobe doesn't say | Mozilla doesn't say |
| Download and print turned off | Pro: “Turn off downloading and printing” | Clear “People who can download, copy, print, and access” in the share settings | showDownloadPDF: false, showPrintPDF: false | Mozilla doesn't say |
| See views | Every plan: page views, and Pages read for each page of the PDF | Google doesn't say | Adobe Analytics or Google Analytics 4, with your IDs | Mozilla doesn't say |
| Largest PDF | 100 MB on Free, 5 GB on Pro | “Up to 5 TB” for files in Drive | Adobe doesn't say; rendering times out after 5 minutes | Mozilla doesn't say |
| Branding in the frame | The Convika bar on Free, none on Pro | Google doesn't say | Adobe doesn't say | Mozilla asks that an embedded viewer “not just be an unmodified version” |
Each vendor's cells come from its own pages, read on November 28, 2026 and listed under Sources. “Doesn't say” means the page is silent on it.
Make the embedded PDF private or not downloadable
- Not downloadable. With Pro, in the page's Page settings, under Download and printing, tick Turn off downloading and printing. The frame shows every page with no download button, and printing the page prints one line saying printing is off. See share a PDF without download.
- Private. A page with a password or a private link never shows inside another website. The switch says so: “A page with a password or a private link is never shown inside other websites. Make it Public without a password to embed it.” For a members-only PDF, put a link to it on your site and give the page a password, part of Pro. See password protect a PDF link.
To start Pro, click Try Pro free for 7 days in the sidebar: 7 days free, then $12 a month, cancel any time before it ends. Pro also takes the Convika bar off the frame.
Frequently asked questions
How do I embed a PDF in an HTML page so it shows on phones too?
Paste an <iframe> that points at a page which draws the PDF itself, not at the .pdf file. On Convika: upload the PDF, publish its page, tick Allow this page to be embedded on other websites in Page settings, and press Copy code. Convika's viewer draws every page inside the frame on iPhone, Android, and computers.
Is there a service that hosts the PDF and gives me the embed code?
Yes. Convika hosts the PDF as a page and gives you its <iframe> code under Embed code, on every plan, including Free. Drop the PDF in the box on this page, keep the page in a free account, publish it, and turn on embedding.
Why doesn't my embedded PDF show on iPhone or Android?
The <iframe>, <embed>, and <object> tags leave the PDF to the phone's browser. In Chrome on Android, a PDF in a frame becomes the file's name and an Open button. On iPhone, WebKit's bug tracker holds a report, open since March 2023, that only the first page of an embedded PDF shows in Safari. A Convika page draws the pages itself, so the frame shows the whole PDF.
Is embedding a PDF free?
Yes. The switch is on every plan. On Free, the frame carries the Convika bar at its foot, and each load of the frame counts as a page view: Free includes 10,000 a month. Pro takes the bar off and includes 100,000 page views a month.
Can I embed the PDF without an account?
The link from the box is a preview for checking on your phone: other websites can't show it in a frame. Click Keep this page — free, no card, publish the page, and turn on embedding. Free needs no card.
Can I see how many people viewed the embedded PDF?
Yes. Each load of the frame counts as a page view of the page, and Pages read shows how many times each page of the PDF was viewed and how long it stayed on screen, on every plan. See PDF tracking.
Can the embedded PDF turn like a book?
Yes. Add ?view=book to the end of the address in the code's src. The frame then shows the PDF as a book: two pages side by side on a wide screen, one on a phone, turned with arrows or a swipe. See PDF flipbook.
Can I embed a password-protected PDF?
No page with a password or a private link shows inside another website. Put a link to the page on your site instead, and give the page a password with Pro. Visitors type it, then read the PDF. A PDF file locked with its own password goes up as a copy saved without the protection.
What is the largest PDF I can embed?
100 MB from the box and on Free. Pro takes files up to 5 GB in the dashboard. To fit a larger PDF under Free's size, shrink it with Compress PDF.
Can I put a link or a button to the PDF instead?
Yes. Publish the PDF's page, then paste its link into Embed PDF in HTML: it writes a text link or a button that opens the PDF in a new tab. For a link to send in an email or a chat, see how to create a link to a PDF or PDF to link.
Sources
Read on November 28, 2026:
- MDN, From object to iframe: general embedding technologies (last modified November 2, 2026)
- MDN,
<object>: the External Object element (last modified September 16, 2026) - Chromium source, pdf_iframe_navigation_throttle.cc, pdf_plugin.html, and features.gni (the main branch)
- WebKit Bugzilla, Bug 253671: Only first page show of an embedded PDF is displayed (status NEW)
- WordPress, File block (last updated July 23, 2026) and the block's own settings in Gutenberg's source
- WordPress, Custom HTML (last updated June 15, 2026)
- WordPress.com Support, Add custom HTML (last reviewed October 5, 2026)
- Google Docs Editors Help, Make Google Docs, Sheets, Slides & Forms public
- Google Sites Help, Add Google files, videos, website content, & more
- Google Drive Help, Share and manage access to files and folders in Google Drive and Files you can store in Google Drive
- Adobe, PDF Embed API: Getting Started, How Tos, UI customization, Analytics, and Pricing
- Mozilla, PDF.js: Getting Started and Frequently Asked Questions
- Wix Help Center, Wix Editor: Embedding a Site or a Widget (last updated November 17, 2026)
- Squarespace Help Center, Embed blocks (last updated July 29, 2026)
- Notion Help Center, Embeds, bookmarks & link mentions
Next step
How to password protect an HTML page or website
A JavaScript password sits in the page source. Free: StatiCrypt or .htaccess. Paid: Netlify Pro $20, Vercel $20 a project, Tiiny Host $18, or Convika Pro.
Related articles
- How to create a link to a PDF that opens on any phone, with no downloadDrop a PDF here and get a link in seconds, with no signup. It opens in the browser on any phone. Plus the steps for Google Drive, Dropbox, OneDrive, and Acrobat.
- Share a PDF without download: a view-only link people read but can't save or printSend a PDF as a link people read in the browser with no download button and printing off. One switch on Convika Pro, with a free trial.
- PDF tracking: see who opened your PDF, when, and which pages they readSend a PDF as a link and see who opened it, when, how many times, and how long each page stayed on screen. Free, with a tracked link for each recipient.
- Password protect a PDF link: send a PDF only people with the password can openUpload a PDF, publish it behind a password, and send the link. Convika's server checks the password before it sends the PDF. Pro, with a free trial.
Skipbox
Cheap & fast GitHub Actions runners, unlimited for $39 a month
Your own machine keeps Docker layers and package caches between jobs. Switch by changing one runs-on line.
Start a free Skipbox trial