Skip to content

elstruck/pdf-takeoff

Repository files navigation

PDF Takeoff Tool

A web-based construction takeoff tool built with Next.js, TypeScript, and shadcn/ui that allows users to measure distances and areas directly on PDF blueprints.

Features

  • 📄 PDF file upload and rendering
  • 📏 Linear measurements with real-world units
  • 📐 Area measurements for spaces
  • 🔍 Scale calibration for accurate measurements
  • 📱 Responsive design
  • 🎨 Modern UI with shadcn/ui components
  • 📄 Multi-page PDF support
  • 💾 Page-specific measurements

Tech Stack

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository:
git clone <repository-url>
cd <project-directory>
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open http://localhost:3000 in your browser.

Usage

  1. Upload PDF: Click the file input to upload your PDF blueprint.

  2. Set Scale:

    • Enter a known measurement length
    • Select the unit (feet, meters, or inches)
    • Click "Set Scale"
    • Click two points on the drawing that represent that known length
  3. Take Measurements:

    • Use the "Measure" tool for linear measurements
    • Use the "Area" tool for area measurements
    • Click points on the drawing to create measurements
    • For areas, click near the starting point to complete the shape
  4. Navigate Pages:

    • Use "Previous" and "Next" buttons to move between PDF pages
    • Measurements are saved per page
  5. View Results:

    • Measurements are displayed in real-time on the drawing
    • A list of all measurements for the current page is shown below

Project Structure

src/
├── app/                  # Next.js app directory
├── components/          
│   ├── ui/              # shadcn/ui components
│   └ PdfViewer.tsx    # Main PDF viewer component
├── hooks/
│   └── usePdfHandler.ts # PDF handling logic
└── types/
    └── pdf.ts           # TypeScript definitions

Development

  • Built with Next.js App Router
  • Uses TypeScript for type safety
  • Implements a custom hook for PDF handling
  • Utilizes two-canvas system for PDF and annotations
  • Follows modern React patterns and best practices

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple PDF construction takeoff annotation tool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors