PDF extraction

How to create a link to a PDF (in 5 seconds)

Three ways to turn a PDF into a shareable link: Google Drive, Dropbox, or okrapdf.com/host. Step-by-step, ranked by speed and embed behavior.

April 30, 2026 Updated June 18, 2026 6 min read okraPDF

A “link to a PDF” is a public URL that, when clicked, opens the PDF in the visitor’s browser. You can’t make one out of a file sitting on your laptop — the file has to live on a web server somewhere first.

Three common ways to do that, ranked by speed:

  • Fastest: drop the PDF on a hosting service (okrapdf.com/host, tiiny.host, pdfFiller). A few seconds. okraPDF needs a free account to publish; the link it gives you is public, so whoever you send it to needs no login to open it.
  • If you already have Google Drive or Dropbox open: upload there and share. Free, but the URL doesn’t end in .pdf, so <embed> and Slack/iMessage previews are spotty.
  • If you have your own website: upload the PDF to your server (/files/report.pdf) and link to it. Most control, most setup.
Interactive A file on your laptop isn't a link. This is.
Public link — ends in .pdfhttps://res.okrapdf.com/q2-report.pdf
Embed URL (for an <iframe>)https://res.okrapdf.com/q2-report/embed
Thumbnail — first-page imagehttps://res.okrapdf.com/q2-report/thumbnail

Type a name to see the URL shape. Publishing takes a free account; the link itself is public — no login to open. Under the hood it's two API calls: upload to /v1/files, then publish with /v1/host.

Method 1 — okrapdf.com/host (a few seconds)

Fastest if you don’t already have Drive/Dropbox open. The link ends in .pdf, so it opens directly in the browser, drops into an <embed> or <iframe>, and is the most likely of these options to preview correctly when pasted into Slack or iMessage.

  1. Open okrapdf.com/host and sign in — a free account, so the file is attributed to you.
  2. Drag the PDF onto the upload area (or click to pick a file).
  3. Copy the link. Done — paste it anywhere.

You get a permalink like https://res.okrapdf.com/q2-report.pdf — the first path segment is your namespace and the .pdf suffix is what makes it behave like a file. The link is public, so the recipient needs no login to open it. The same upload also exposes clean derived URLs (/q2-report/embed, /q2-report/thumbnail) and a q2-report.okrapdf.dev deployment hostname. Signing up also mints an API key so you can do all of this from code (see below).

Method 2 — Google Drive

  1. Open drive.google.com and upload the PDF.
  2. Right-click the file → ShareAnyone with the linkViewer.
  3. Click Copy link.

You get a URL like https://drive.google.com/file/d/1abc.../view?usp=sharing. The visitor sees Google’s PDF viewer, which is fine for plain reading. It will not embed nicely in a website (<iframe> blocks load), and unfurls in Slack, iMessage, or Discord often show “Google Drive” instead of the PDF’s first page.

Use this if the recipient is one specific person and you don’t care about preview behavior.

Method 3 — Dropbox

  1. Upload the PDF to Dropbox.
  2. Hover the file → ShareCreate link.
  3. Append ?dl=1 to force download, or ?raw=1 to serve the PDF inline.

Same caveat as Drive — the URL doesn’t end in .pdf, so unfurls and <embed> tags are spotty. Better than Drive for force-downloads (?dl=1).

Method 4 — your own website

Most control, most work. Two flavors:

  • Static site (Vercel, Netlify, Cloudflare Pages): drop the PDF in /public/files/report.pdf, redeploy, link to yoursite.com/files/report.pdf.
  • WordPress / CMS: Media Library → Upload → copy the URL it gives you.
  • S3 / R2 / GCS: upload the object, set ACL to public-read, link to the public object URL. Add a Cache-Control header so it actually CDNs.

Use this if the PDF is part of your product (a brochure, a report) and you want it on your own domain for SEO and analytics. Skip it for ad-hoc shares — the round-trip through deploy is slower than any of the methods above.

Which one should I use?

  • Sharing once with one person? Drive or Dropbox — you already have an account, the link is fine.
  • Posting to a website, Slack channel, or email blast? okrapdf.com/host — the URL ends in .pdf so unfurls and <embed> work.
  • You’re a developer and want this in your code? okrapdf.com/host mints a free API key on signup. Two calls — upload the PDF to /v1/files, then publish it with /v1/host — and you get a permalink back. No SDK required.
  • It’s on your own product’s domain? Self-host on your static site or object store.

A public PDF link is genuinely public. Worth knowing before you paste it somewhere you can’t easily take back:

  • Anyone with the URL can open it. A plain public link has no “only these people” — if the PDF has anything sensitive, redact it first or use access controls instead of a public link.
  • Public means crawlable. Search engines and AI crawlers can index a public .pdf URL. Fine for a brochure, not for a contract.
  • You can take it down. On okraPDF you can unpublish or repoint a namespace to a different file (replace: true on the API) — a public URL isn’t necessarily forever, in either direction. Read the fine print on any host before printing a link you can’t change.
  • Mind the file size. A 100 MB scan is a slow open for whoever’s on mobile — compress it first if it’s huge.

Common gotchas

  • The link 404s when the recipient opens it. Drive and Dropbox default to “Restricted” access — you have to explicitly switch to “Anyone with the link.” okraPDF and your-own-server links are public by default.
  • Slack/iMessage shows the wrong preview. Unfurls depend on the receiving app, the URL’s extension, and the Open Graph tags the host emits — they’re never fully guaranteed. URLs ending in .pdf (okraPDF, self-hosted) are the most likely to preview as the document; Drive/Dropbox URLs usually preview as the host service instead.
  • The PDF downloads instead of opening in the browser. Wrong Content-Disposition header on the server. okraPDF and CDN-served files default to inline. Dropbox needs ?raw=1.
  • The link breaks in 30 days. Some hosting tiers expire links. Read the fine print before sharing in something you can’t edit later (a printed flyer, a podcast description).

Doing this in code (developers)

If you’re here because you’re building a feature that needs to turn user-uploaded PDFs into shareable links, you don’t want to manually drag files anywhere. Upload the PDF once, then publish that file ID as a hosted PDF:

FILE_ID=$(curl -sX POST https://api.okrapdf.com/v1/files \
  -H "Authorization: Bearer $OKRA_API_KEY" \
  -F "file=@report.pdf" | jq -r .file_id)

curl -sX POST https://api.okrapdf.com/v1/host \
  -H "Authorization: Bearer $OKRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$FILE_ID\",\"namespace\":\"q2-report\"}"

Free tier mints a key on signup. The host response includes stable, CDN-served URLs for the PDF, embed view, thumbnail, page images, and manifest. Same surface that powers /host — the page is just the no-code UI on top of the API.

TL;DR

Three options, in increasing order of “this scales”: Drive/Dropbox for one-off shares, okrapdf.com/host for a .pdf permalink that embeds cleanly and previews better than a Drive link, your own server when the PDF lives inside a product. Pick by whether the link will be seen once or 10,000 times.

Turn a PDF into a link — free account →