這個頁面還沒有繁體中文版,先以英文顯示。

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.

Embed my PDF

Free plan: no credit card, PDFs up to 100 MB. Embedding is on every plan.

On this page

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:

  1. Open your site in Google Sites.
  2. On the right, click Insert, then Drive.
  3. Choose the PDF, then click Insert.
  4. 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's viewer.js, and a previewFile call 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:

BuilderWhere the code goesGood to know
WordPress.orgAdd a Custom HTML block (type /html), click Edit HTML, paste the code, and press UpdateFor a user without the unfiltered_html capability, such as a Contributor, WordPress removes <iframe> on save
WordPress.comClick 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.”
WixAdd 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 SitesInsert > 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
SquarespaceAdd block > Embed, click the pencil icon, click Code snippet, and paste into Embed DataSquarespace hides some embeds while you're logged in, so check the page logged out
NotionType /embed and press Enter, then paste the page's link, not the codeThe link should “start with https not <iframe”. See embed HTML in Notion

Embedded PDFs compared side by side

ConvikaGoogle Drive in Google SitesAdobe PDF Embed APIPDF.js on your server
Every page shows in the page on phonesYes: its viewer draws them in the frameGoogle doesn't saySupported: Chrome on Android; Safari and Chrome on iOS“the latest desktop/mobile versions are implied”
What you set upA free account; copy one line of codeA Google Sites site and the PDF in your DriveA client ID for your domain, a host for the PDF, and JavaScriptA server for the viewer and the PDF
Visitor signs inNoNo, with “Anyone with the link”Adobe doesn't sayMozilla doesn't say
Download and print turned offPro: “Turn off downloading and printing”Clear “People who can download, copy, print, and access” in the share settingsshowDownloadPDF: false, showPrintPDF: falseMozilla doesn't say
See viewsEvery plan: page views, and Pages read for each page of the PDFGoogle doesn't sayAdobe Analytics or Google Analytics 4, with your IDsMozilla doesn't say
Largest PDF100 MB on Free, 5 GB on Pro“Up to 5 TB” for files in DriveAdobe doesn't say; rendering times out after 5 minutesMozilla doesn't say
Branding in the frameThe Convika bar on Free, none on ProGoogle doesn't sayAdobe doesn't sayMozilla 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.

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:

Put the PDF inside your site, not behind a download

Every page shows in the frame on iPhone and Android. Copy one line of code and paste it.

Embed my PDF

Free plan: no credit card, PDFs up to 100 MB. Embedding is on every plan.