pen.sh

New Feature: Upload & Modify Your Existing Documents with AI

pen.sh now lets you upload PDF, Word, and image files to modify, convert, or use as templates. See how AI-powered document processing makes it easy to work with existing agreements.

pen.sh Team ·
A smartphone screen showing document upload interface with AI modification

We’re excited to announce a major new feature: document upload and AI-powered modification. You can now upload your existing documents—PDF files, Word documents, even images—and ask our AI to help you modify them, convert formats, or use them as templates.

What You Can Do

Upload Any Document Format

pen.sh now supports uploading:

  • PDF files (scanned or digital)
  • Word documents (.docx, .doc)
  • Images (PNG, JPG, JPEG, WebP)
  • Text files (markdown, HTML, plain text)

Simply click the paperclip icon in the chat interface, select your file, and the AI will extract and understand the content.

Modify Existing Agreements

Have an old roommate agreement that needs updating? Upload it and say:

  • “Add a clause about quiet hours after 10 PM”
  • “Change the rent from $1,200 to $1,500”
  • “Add John Smith as a third signer”

The AI reads your document, understands the structure, and makes the changes while preserving the original formatting and legal language.

Convert Between Formats

Need a Word doc as a PDF, or an image as editable text? Just upload and ask:

  • “Convert this to a PDF with signature fields”
  • “Extract the text from this scanned lease”
  • “Turn this image into an editable document”

Our AI-powered processor handles OCR (optical character recognition), format conversion, and text extraction automatically.

Use as a Template

Upload your company’s standard lease template and say:

  • “Use this template to create a lease for 123 Main St”
  • “Fill in the blanks with: $2,000 rent, 2-bedroom, starting March 1st”
  • “Create a sublease version of this lease”

The AI understands your template’s structure and generates a new document following the same format.

How It Works

1. Smart Document Processing

We use Microsoft’s MarkItDown technology combined with specialized PDF and image processing tools. When you upload a document:

  1. The system automatically detects the file type
  2. Extracts all text content (including from images via OCR)
  3. Preserves structure, formatting, and context
  4. Verifies quality with confidence scoring

2. Intelligent Context Awareness

The AI doesn’t just see random text—it understands:

  • Document sections and clauses
  • Legal terminology and structure
  • Dates, names, and addresses
  • Tables and formatted lists
  • Signature block layouts

3. Fallback Processing

If one extraction method doesn’t work well (like a low-quality scan), the system automatically tries alternative approaches:

  • MarkItDown for most formats
  • Specialized PDF text extraction for digital PDFs
  • Image OCR for scanned documents
  • Word document parsing for .docx files

Real-World Use Cases

Roommate Agreement Updates

Scenario: Your lease expires in 3 months, but one roommate is moving out early.

Solution: Upload your existing roommate agreement, say “Remove Sarah Johnson and add early termination clause allowing 60-day notice with $500 penalty.”

Lease Renewal Modifications

Scenario: Your landlord agreed to a rent increase but you want to keep everything else the same.

Solution: Upload last year’s lease, say “Change rent from $2,400 to $2,600, extend term to March 1, 2027, and add option to renew for another year.”

Converting Personal Templates

Scenario: You have a Word template you’ve used for years but need it as a signable PDF.

Solution: Upload the .docx file, say “Convert this to a PDF and add signature fields for landlord and tenant at the bottom of each page.”

Working with Scanned Documents

Scenario: You only have a photo of your signed lease and need to make amendments.

Solution: Upload the image, say “Extract the text and create an addendum allowing pets with a $300 deposit.”

Technical Details

For the curious, here’s what powers this feature:

  • MarkItDown MCP Server: Microsoft’s Model Context Protocol server for document-to-markdown conversion
  • Agentic Processing Pipeline: Self-verifying quality checks and automatic fallback strategies
  • Multi-Format Support: Handles PDF (via pdf-parse), DOCX (via mammoth), images (OCR), and more
  • Quality Scoring: Heuristic algorithms verify extraction quality before returning results

The entire process happens in seconds, and the AI receives clean, structured text it can understand and work with.

Privacy & Security

Your documents stay secure:

  • Files are processed ephemerally and never stored permanently
  • Extraction happens in isolated containers
  • Text content is only held in memory during your chat session
  • No training data is collected from your uploads
  • All uploads are tied to your session and deleted when you log out

Getting Started

Upload your first document today:

  1. Start a new chat at pen.sh/chat
  2. Click the paperclip icon (📎) in the input bar
  3. Select your file (PDF, DOCX, image)
  4. Tell the AI what you want to do with it

Example prompts to try:

  • “What are the main points in this agreement?”
  • “Add a 30-day notice requirement for move-out”
  • “Convert this to a sublease with me as the sublessor”
  • “Add signature fields for 3 people”

What’s Next?

We’re continuously improving document processing quality. Upcoming enhancements include:

  • Better OCR for handwritten text
  • Table extraction and recreation
  • Multi-page image document stitching
  • Support for spreadsheets (Excel, CSV)
  • Batch document processing

Try It Free

Upload and modify your first document with no credit card required. Your first 10 documents are free, including uploads.

Start Creating →


Have questions or feedback about document uploads? Email us or start a chat—we’d love to hear what you’re working on.