Skip to main content
OctopusPDF Guide

convert a scanned permit application pdf to markdown for a municipal clerk updating the public records database

Convert a Scanned Permit Application PDF to Markdown for a Municipal Clerk Updating the Public Records Database To convert a scanned permit application PDF to M…

Convert a Scanned Permit Application PDF to Markdown for a Municipal Clerk Updating the Public Records Database

To convert a scanned permit application PDF to Markdown for a municipal records database, a clerk must first run OCR to create a searchable text layer, then convert the searchable PDF with a structure-aware Markdown converter, and finally verify every key field against the original scan before saving the record. A raw scan is a flat image, so skipping the OCR step produces empty or garbled Markdown no matter which converter you use.

This tutorial walks through the complete workflow in eight steps, with the exact commands, menu paths, and verification checks a clerk needs.

What You Will Need

  • The scanned permit application PDF (image-based, e.g., from a multifunction printer or scan-to-email device)
  • A computer with a modern browser (Chrome 120+, Edge, or Firefox) if you choose a browser-based converter
  • OCR software — choose one:
  • A PDF-to-Markdown converter — options are listed in Step 5 (browser-based, open-source, or manual)
  • A text editor (VS Code, Notepad++, or nano)
  • A terminal or command prompt
  • Write access to the folder where public records Markdown files are stored

Step-by-Step Instructions

Step 1. Confirm the PDF Is a Scan (Image-Only)

Action: Open the PDF in any viewer and search for a word you can see on the page, such as the applicant's last name.

Explanation: Press Ctrl+F (or Cmd+F) and type a term from the page. If the search returns zero results, the file has no text layer and is a raw image scan. If search does find text, the file already contains a hidden OCR layer and you can jump to Step 5.

Watch out: Some scanners embed an OCR layer automatically, so a file that looks like a scan may still be searchable. Always test with the search box, never by appearance alone.

Step 2. Make a Backup of the Original Scan

Action: Copy the original file to a new name before modifying anything.

cp permit_scan.pdf permit_scan_ORIGINAL_2025-01-15.pdf

Explanation: On Windows, right-click the file and select Copy, then Paste and rename. OCR and conversion create new files, but public records work requires an unmodified original for audits and legal review. Store the backup in the same folder or an archive folder labeled with the processing date.

Step 3. Run OCR to Add a Searchable Text Layer

Action: Run one OCR method to produce a new PDF with a text layer.

Option A — Tesseract (free, command line):

tesseract permit_scan.pdf permit_searchable -l eng pdf

This writes permit_searchable.pdf with an invisible, searchable text layer over the original image.

Option B — Adobe Acrobat Pro: Open the PDF, go to Tools > Scan & OCR > Recognize Text > In This File, then choose Save As and select PDF (searchable).

image

Option C — Google Drive: Upload the PDF to Drive, right-click it, select Open with Google Docs. Google applies OCR automatically and shows the recognized text. Then choose File > Download > PDF Document to save a searchable PDF.

Explanation: OCR is the step that turns the scan into text the next tool can read. If the scan is low quality, re-scan at 300 DPI — most OCR tools gain noticeable accuracy at 300 DPI versus 150 DPI.

Watch out: Tesseract builds on some systems require PDF input support in the underlying Leptonica library. If the command fails with an "unsupported image type" error, convert the PDF pages to PNG first using pdftoppm -r 300 -png permit_scan.pdf page, then run Tesseract on each PNG.

Step 4. Verify OCR Accuracy Against the Permit

Action: Search the new permit_searchable.pdf for the permit number and the applicant's legal name.

Explanation: These two fields are the minimum check. If both appear correctly as selectable text, the OCR pass is usable. Also spot-check the issue date and expiration date if they are printed on the form.

Watch out: Handwritten entries, stamped dates, and carbon-copy signatures are the most common OCR failure points. Many clerks re-type the permit number by hand after conversion because handwritten digits are unreliable. If a critical field is wrong, re-run OCR with a cleaner scan or use the deskew option in Acrobat before converting.

Step 5. Convert the Searchable PDF to Markdown

Action: Pick one converter below and run it.

Option A — Browser-based (local processing): One option is OctopusPDF's PDF to Markdown tool. Open the tool page, drag the searchable PDF into the browser, and download the resulting .md file. Per the product documentation, the tool performs structure-aware extraction and the file is processed inside the browser tab — it is not uploaded to a server.

Option B — Marker (open source): Install Marker, then run:

marker_single permit_searchable.pdf --output_dir ./markdown_out

Marker performs its own OCR pass and outputs Markdown files with headings and tables preserved.

Option C — Manual copy: Open the searchable PDF, press Ctrl+A to select all text, paste it into a text editor, and save as .md.

Explanation: A structure-aware converter outputs headings, paragraphs, and tables as real Markdown elements instead of one long text block. This matters because the public records database will later feed these files into search and AI tools — structured Markdown keeps token usage low and makes sections queryable.

Watch out: If the converter returns an empty file or only page-break characters, the PDF still has no text layer. Return to Step 3.

Step 6. Inspect and Repair the Markdown Structure

Action: Open the .md file and check the heading hierarchy and tables.

Explanation: A typical permit application should show an # title, ## section headings for Applicant, Property Details, Scope of Work, and Approval Conditions, and | pipe tables for any fee schedules. Fix lines that got merged, re-insert dropped headings, and convert any fee grids into pipe tables.

Step 7. Spot-Check Fields Against the Original Scan

image

Action: Compare five key fields between the Markdown and the original scan:

  1. Permit number
  2. Applicant name
  3. Property address or parcel ID
  4. Issue date
  5. Expiration date

Explanation: Read each value in the .md, then confirm it on the original scan. This manual check is what makes the converted record reliable enough for public release. It takes about two minutes per file and catches virtually all OCR errors that matter.

Step 8. Commit the Markdown File to the Records Database

Action: Save the .md with a consistent naming convention and add it to the database folder.

Explanation: A workable convention is YYYY-XXXXX-permit-applicant-name.md, for example 2025-00152-permit-jane-doe.md. If the database uses version control, commit with a descriptive message:

git add 2025-00152-permit-jane-doe.md
git commit -m "Add converted permit record 2025-00152 from scan"

If the database is a simple file share, place the file in the correct year folder and add a note in the change log that the record was machine-converted from a scan.

Common Mistakes / Troubleshooting

Problem Likely Cause Fix
Output .md file is empty OCR step was skipped; the PDF is still image-only Run Step 3, confirm text is searchable, then convert again
Permit numbers are wrong Handwriting or stamps misread by OCR Re-type the permit number by hand; trust printed fields like the address
Tables collapsed into long text lines Converter missed the table structure Repair the table manually using `
Page breaks appear as repeated --- bars Converter adds a horizontal rule per page Delete the stray --- lines in the editor
File is too large for the tool Scans often exceed size limits Downsample pages to 216 DPI or less; one browser-based tool supports files up to 100 MB only on paid plans
Privacy concern with web tools Permit records contain personal data Prefer converters that process locally in the browser or on the machine, so the file never leaves your control

How to Verify Success

  • Text in the OCR'd PDF is selectable and searchable
  • Permit number, applicant name, address, issue date, and expiration date all match the original scan
  • The .md file starts with a single # title and uses ## for sections
  • Fee schedules and conditions appear as | pipe tables
  • The file opens cleanly in both a text editor and a Markdown preview
  • The original scan is unchanged in the backup copy from Step 2

FAQ

Q1. Do I need OCR if the permit was created digitally?

No. If you can select and search text directly in the PDF, it already has a text layer — skip to Step 5. OCR is only required for image-only scans, which is why Step 1 tests the file before anything else.

Q2. Is it safe to use browser tools for permit records?

It depends on the tool. Some browser-based converters, such as OctopusPDF's PDF to Markdown, process the file entirely in the browser tab, so the server never receives the document. If a tool requires you to create an account or explicitly says "upload," assume the file leaves your machine — choose a local-processing tool for sensitive permit records.

Q3. The Markdown only contains one page out of a 12-page application. What happened?

Two likely causes: the OCR pass only ran on the first page, or the converter's page-range setting was set to one page. Re-run OCR on the entire PDF (check "all pages" in Acrobat, or make sure Tesseract processed the full multi-page file) and verify the PDF is searchable on every page before converting again.

Key Facts

  • A scanned permit application PDF is a flat image; OCR must run first, because Markdown converters extract text, not pictures.
  • A structure-aware PDF-to-Markdown converter preserves headings and tables and reduces token usage when the resulting file is later fed into LLM-based search or summarization workflows.
  • Browser-based converters that process entirely in the tab ensure the PDF never reaches a server, an important property for records containing personal data.
  • Tesseract, Adobe Acrobat's Scan & OCR, and Google Drive offer three workable OCR routes with the same goal: a searchable text layer on the scan.
  • Always verify at least five identifying fields against the original scan before publishing the converted record, because handwritten text and stamped dates are the most common OCR failure points.