PDF Tools
India
No Upload

Scan to PDF Online Free Camera: India After the CamScanner Ban

Scan to PDF online free with your camera — browser-only, no upload, post-CamScanner India guide for Aadhaar, PAN, and GST scans on iOS and Android.

PDF Mavericks·

CamScanner was banned in India on 29 June 2020. Almost six years later, most users who relied on it for Aadhaar copies, PAN cards, GST invoices, and salary slips are still on shady alternatives — Play Store look-alikes that ship as Android APKs but are functionally web-wrappers, exfiltrating scans to servers in jurisdictions with very different data-protection laws than the one their owners live in. There is a browser-only path that sidesteps that whole class of risk. This guide is about how to scan to PDF online free with your camera, in your browser, with the documents never leaving your phone.

The argument is short: the camera frame is captured to a local canvas, OpenCV.js runs the edge detection on that canvas, pdf-lib assembles the PDF in memory, and the browser triggers a download. No HTTP request carries image data. You can verify this in DevTools. The longer argument — why this matters for India specifically, what the regulatory context is, and which workflow steps usually follow scanning — fills the rest of the page.

The 2020 CamScanner ban — what actually happened

On 29 June 2020 the Government of India invoked Section 69A of the Information Technology Act, 2000, and blocked 59 mobile apps of Chinese origin. The list, published in the Press Information Bureau release dated 2 July 2020, included CamScanner, TikTok, UC Browser, ShareIt, Helo, Mi Community, and others. The notification cited activities prejudicial to sovereignty and integrity of India and called out background data transmission to servers outside Indian jurisdiction. CamScanner alone, by its own pre-ban marketing, claimed more than 100 million installs in India.

The ban left a real hole. The CamScanner use case — point your phone at an Aadhaar card, a PAN card, a GST invoice, an HR onboarding form, or a passbook page, and get back a flat, perspective-corrected, shareable PDF — was not optional for most knowledge workers and small-business owners. The Indian app ecosystem responded with a wave of replacements: Kaagaz Scanner, Doc Scanner, Adobe Scan, Microsoft Lens, and many smaller native apps. Most are honest implementations. Several are not.

The underlying problem is structural. A native mobile app sees your camera roll, your storage, sometimes your contacts, and runs background processes you cannot easily audit. Even when the app developer is acting in good faith, an SDK update from an analytics vendor or an advertising integration can change the network behaviour without notice. The only way to know what an app is doing right now is to install a packet-capture tool on your phone and look. Most users do not.

Why "online camera scanner" is a privacy minefield in 2026

Search results for "online camera scanner India" today return a mix of legitimate browser tools, Play Store APK pages, and aggregator sites that point at thinly-disguised wrappers. Three failure modes show up repeatedly:

  • Web-wrapper APKs. The app is a thin Android shell around a remote server. You scan a document, the app uploads the frame, the server runs the edge detection and perspective warp, and the result comes back. Your Aadhaar touched a third-party server you cannot inspect.
  • Upload-based browser tools. Even the ones labelled "online" and "free" often POST the captured image to a backend. The privacy policy mentions processing on AWS or GCP without specifying retention. The business model is sometimes display ads; sometimes it is the dataset itself.
  • Ad-tech bundling. A free scanner app loads four advertising SDKs at startup. Each SDK, by design, observes app usage to attribute conversions. Even if the scanned document never leaves the device, the metadata about when and how often you scan documents goes upstream.

For an Indian SMB owner who needs to upload an attested PAN card to the GSTN portal, or a student who needs to generate a passport photo PDF for a college admission, the privacy posture matters. The Digital Personal Data Protection Act, 2023, raises the compliance cost of cross-border data transfers, but the Act applies to data fiduciaries — the SMB owner is a data principal and is responsible for choosing tools that do not leak personal data in the first place.

The browser-only path — getUserMedia, OpenCV, pdf-lib

The technical argument for browser-local scanning is that every piece of the pipeline already exists as a web standard or an open-source library that runs in the browser. There is no functional reason to round-trip the image data to a server.

Camera access uses the W3C Media Capture and Streams specification, exposed in JavaScript as navigator.mediaDevices.getUserMedia(). Chrome and Firefox on Android shipped this in 2017; iOS Safari in 14.3 (December 2020). The page asks for the rear camera with { video: { facingMode: "environment" } }, the browser shows the standard permission prompt, and on approval streams the camera feed into a hidden <video> element on the page. No data leaves your device.

Edge detection and perspective warp use OpenCV.js, the WebAssembly build of the OpenCV computer-vision library. The pipeline on each frame: convert to grayscale, blur with a 5×5 Gaussian kernel, run Canny edge detection (thresholds 75 and 200), find contours, pick the largest 4-vertex polygon whose area exceeds 10 percent of the frame. That polygon is drawn back as an orange overlay so you know what the scanner is locked onto. On capture, the same pipeline runs once on the full-resolution still, followed by cv.getPerspectiveTransform and cv.warpPerspective. The result is a flat rectangle of just the document.

PDF assembly uses pdf-lib, a pure JavaScript PDF library. Each captured page is written as a JPEG into a fresh PDF document; the final byte stream is offered as a Blob via URL.createObjectURL, and the anchor element triggers a download. No fetch call, no XMLHttpRequest, no WebSocket. The PDF is born and dies in your browser tab.

The OpenCV.js bundle is roughly 8 MB, fetched from the official OpenCV CDN at docs.opencv.org/4.10.0/opencv.js and cached by the browser for the rest of the session. That fetch happens only when you actually open the camera or upload a photo — the homepage, the Compress PDF tool, the Merge PDF tool, and every other route on PDF Mavericks share the same 104 kB baseline JavaScript bundle. The 8 MB cost is paid once, by people who use the scanner, on the first scan.

How to scan to PDF online free with your camera

Four steps. The whole flow takes under 30 seconds for a single-page document, longer for multi-page batches because you are physically positioning each page.

  1. Open /scan-to-pdf on your phone. The page loads its 104 kB baseline and shows two buttons: Open Camera and Upload Photos. Tap Open Camera. The browser prompts for camera permission; allow it. On Android Chrome, this happens immediately. On iOS Safari, the prompt appears the first time per origin and is remembered.
  2. Position the document inside the orange overlay. The overlay appears as soon as OpenCV.js has loaded. Move the phone until all four corners of the page sit inside the overlay polygon. The overlay locks on within a couple of frames in good lighting. If it does not lock, the surface underneath is too similar in colour to the document — switch to a dark or contrasting background.
  3. Tap Capture Page. The current frame snapshots to a full-resolution canvas. The page runs the perspective warp, applies the Auto filter (adaptive threshold for crisp text), and adds the result to the page list at the bottom of the screen. Repeat for each additional page. You can change the filter to Color or Grayscale for any individual page from the list.
  4. Tap Build PDF. pdf-lib assembles the captured pages in order, writes the JPEGs into a fresh PDF document, and the browser triggers a download named scanned-document.pdf. The file lands in your phone's Downloads folder. From there, it goes wherever you need — email, WhatsApp, the GSTN portal, Drive.

If you do not see the camera prompt, your browser may not support getUserMedia, or you may have denied permission previously. Use the Upload Photos fallback: capture each page with your phone's native camera app (Photos / Gallery), then tap Upload Photos and select the JPEGs. The same edge-detect plus perspective-warp pipeline runs on uploaded images, so the output PDF looks identical to a fresh camera scan.

iOS Safari compatibility and the iPhone fallback

iOS Safari supports rear-camera capture via getUserMedia from iOS 14.3 (released December 2020) onward. That covers every iPhone running an OS update from 2021 or later — practically all iPhones you encounter today, except for legacy devices stuck below iOS 14. Apple held out longer than Android on this API because of long-running platform philosophy debates about background camera access; once shipped, the iOS implementation is solid.

On iOS 14.3+, the page calls navigator.mediaDevices.getUserMedia() with a constraint requesting the environment-facing camera. iOS Safari shows a system-style permission prompt. On approval, the rear camera streams into a hidden video element. The browser handles HEIC capture transparently — the canvas reads JPEG-style RGBA pixels regardless of the underlying sensor format, so the rest of the pipeline does not need to know about HEIC at all.

On older iOS versions, or in private browsing mode where camera access is restricted, fall back to the Upload Photos route. Capture with the iOS Camera app, share to Safari (or save to the Photos library and re-select), and the same processing pipeline runs on the uploaded JPEGs. If you already have HEIC files on an iPhone — the default capture format since iOS 11 — run them through HEIC to PDF instead, which reads HEIC directly with libheif and skips the camera step entirely.

Post-scan workflow: deskew, OCR, redact, sign

A scan is rarely the end of the document workflow. Five common next steps, all browser-local on PDF Mavericks:

  • Fix any residual skew. The perspective warp corrects the major angle problem, but ADF-fed scanners and shaky-handed phone scans occasionally leave 0.5° to 3° of residual tilt. OCR engines tolerate up to about 0.5° before accuracy starts dropping. If you plan to OCR, run the scanned PDF through /deskew-pdf first — it uses a Hough-line transform to detect the dominant text-line angle on each page and rotates accordingly.
  • Make it searchable with OCR. Scanned pages are images. To search the PDF, copy text from it, or feed it to a RAG pipeline, you need the text recognised. /ocr-pdf runs Tesseract.js in your browser with both English and Hindi traineddata, embeds the recognised text as an invisible layer on top of the image, and exports a searchable PDF — same browser-local privacy posture as the scanner.
  • Redact PII before sharing. Aadhaar copies, PAN cards, salary slips, and bank statements often need to be shared with partial information visible. /redact-pdf draws permanent black bars over selected regions and removes the underlying text from the PDF object stream — not just a visual overlay. For Aadhaar specifically, use the dedicated /aadhaar-mask tool, which hides the first eight digits per the UIDAI Masked Aadhaar guideline before sharing.
  • Sign electronically. /sign lets you draw, type, or upload a signature image and place it anywhere on the PDF. The signed file is downloaded directly; nothing is uploaded, nothing is logged, no email roundtrip. For documents where Aadhaar e-Sign is required (legally binding under the IT Act 2000), use the regulator's official portal for the signing step itself, but use this tool to assemble the document beforehand.
  • Compress for email and portal limits. Multi-page scans add up quickly — a 10-page PDF at 2× device pixel ratio is often 8 to 12 MB. The GSTN portal cap is 5 MB for most attachments; many email providers cut off at 25 MB. Run the scan through /compress to bring it under the cap without losing legibility.

Verifying the privacy claim yourself

"Browser-local" is a technical claim and you do not have to take it on faith. The audit trail is two minutes of work in DevTools:

  1. Open /scan-to-pdf on a desktop Chrome session. Press F12 to open DevTools and switch to the Network tab. Filter to Fetch/XHR.
  2. Capture three pages using the Upload Photos fallback (desktop cameras are usually too low-resolution for documents). Watch the filter stay empty.
  3. Switch to the Img filter — you will see one fetch from docs.opencv.org for the OpenCV.js WebAssembly bundle. That is code coming down to your browser, not images going up.
  4. Tap Build PDF. The Network tab stays empty; a download appears in your browser. The PDF was assembled in memory and exported via URL.createObjectURL.
  5. Disconnect from the internet after step 3. Capture more pages and build another PDF. The scanner keeps working — proof that no server round-trip is required.

That is the verifiable difference between a browser-local scanner and an upload-based one. The audit takes longer to read about than it does to run.

Your camera frames never leave your phone

PDF Mavericks runs the camera, the edge detection, and the PDF assembly entirely in your browser. No file is uploaded to any server. Aadhaar, PAN, GST invoices, and salary slips stay on your device where they belong.

Frequently asked questions

Does the scan to PDF online free camera tool work offline?

Once the page and OpenCV.js have loaded once in your browser, yes — you can disconnect your phone or laptop from the internet and the scanner keeps working. The page caches itself and the WebAssembly engine on first visit, then runs the camera, edge detection, and PDF assembly entirely against that cached code. We do not currently ship a service worker that pre-fetches everything for true PWA-style offline-first install, so the very first visit needs a network. After that, everything runs locally. You can verify by opening DevTools, watching the Network tab go silent on a second visit, and capturing a few pages.

Does this work on iPhone and iPad?

Yes, on iOS Safari 14.3 and newer (released December 2020). Apple held back rear-camera access via getUserMedia until that release; older iOS versions either show no permission prompt or only expose the front camera. If you are stuck on an older iPhone, switch to the Upload Photos fallback — capture with the native iOS Camera app, then drop the JPEGs into the page and the same edge-detect and perspective-warp pipeline runs on the uploaded images. Output is identical to a fresh camera scan.

Can I scan a multi-page document into a single PDF?

Yes, that is the default workflow. Capture page 1, the page list adds it. Tap Capture Page again for page 2, page 3, and so on — each capture appends to the same in-progress PDF. When you tap Build PDF the entire batch downloads as one file. You can remove or re-shoot any page before building, and you can choose Auto, Color, or Grayscale per page so a colour cover and grayscale interior pages live in the same document. The page order in the list is the page order in the output.

What cameras and phones does the scan to PDF online free camera tool support?

Anything that exposes a rear camera through the W3C Media Capture API. That covers Chrome and Firefox on Android since 2017 and iOS Safari 14.3+ on iPhone and iPad. Desktop laptops with built-in webcams technically work, but the front-facing low-resolution sensor is rarely useful for documents — use the Upload Photos fallback instead and feed JPEGs from your phone or a flatbed scanner. The page automatically requests the environment-facing camera, so on a phone with multiple lenses (wide, ultra-wide, telephoto), the OS picks the standard wide rear lens.

Does the scanner auto-rotate documents that came in upside down?

Yes. The edge-detection pipeline finds the largest 4-vertex contour in the frame and sorts the corners (top-left, top-right, bottom-right, bottom-left) before running the perspective transform. So even if you held the phone with the document rotated 180 degrees, the output PDF page comes out right-side-up. For documents that came out skewed by a few degrees because of an unsteady hand, the perspective warp also fixes that as a side effect — the output is always rectangular regardless of the input camera angle. If you need to fix skew on already-scanned PDFs that did not go through this pipeline, run them through our deskew tool below.

What about low-light scanning?

The detector needs the document to contrast with the background. A white sheet on a dark wooden desk works well; a white sheet on a white tablecloth fails because Canny edge detection cannot find a boundary. In genuinely low light, switch on a desk lamp or move near a window. The Auto filter applies an adaptive Gaussian threshold (block size 15, constant 10) after capture, which makes black-on-white text crisp even on a less-than-perfect lighting setup — but it cannot compensate for an outright dark room. If you cannot get a clean lock, capture without the orange overlay (the page falls back to the raw frame), then crop and rotate manually before building the PDF.

Can I export individual JPEG images instead of a PDF?

Not directly from this page — the output is always a PDF because that is the format most people need for emails, GST submissions, and KYC. If you want JPEGs you have two options. First, capture as normal, then run the resulting PDF through pdf-to-jpg in another browser tab. Second, use the Upload Photos fallback with already-existing JPEGs — the file is preserved as input, so you can right-click and save the per-page processed canvas via DevTools if you really need it. Most users want the PDF, so we kept the export path narrow.

Why is this safer than the CamScanner-clone Android APKs that replaced it?

After the June 2020 ban, dozens of look-alike scanner apps rushed in to fill the gap. Many are functionally web-wrappers — a thin Android shell around a remote server that does the actual edge detection and PDF assembly. That means your Aadhaar, PAN, or salary slip leaves your device the moment you scan it, and you have no way to audit what happens at the other end. A browser-based scanner sidesteps that whole class of risk: there is no native app installed, no background process running when the app is closed, and the camera frames stay in the page's memory. Open DevTools, switch to the Network tab, and watch it stay empty as you scan — that is the audit anyone can run before trusting a tool with regulated documents.

Related guides