📝 Edit PDF – Frequently Asked Questions

Everything you need to know about editing PDF documents online with PDF Lab's free editor

← Go to Edit PDF Tool

The Edit PDF tool is a free online editor that allows you to add annotations and content to existing PDF documents without installing any software.

You can:

  • Add Text: Insert text boxes with custom content anywhere on your PDF pages
  • Insert Images: Upload and place images, logos, or graphics on your documents
  • Draw: Use the freehand pencil tool to draw shapes, lines, or signatures
  • Add Comments: Place comment boxes for notes and annotations
  • Place Checkboxes: Add interactive checkboxes with toggle on/off functionality
  • Delete Objects: Remove any added elements using keyboard shortcuts

The tool uses Fabric.js for canvas overlay on PDF.js rendered documents, supporting multi-page PDFs with per-page annotation storage. All annotations are processed server-side using FPDI with TCPDF.

Adding text to your PDF is simple with our text tool:

  1. Upload: Upload your PDF file using the file picker
  2. Select Tool: Click the "Text Tool" button in the toolbar
  3. Place Text: Double-click anywhere on the PDF page where you want to add text
  4. Type: A text box will appear – start typing your content immediately
  5. Customize: Move the text box by dragging it, or resize it using the selection handles
  6. Edit: Double-click any text box to edit its content

Technical Details: Text is rendered using DejaVu Sans font which supports Unicode characters including special symbols, accents, and international languages. Font size is converted from pixels to points (pixels × 0.75 = points) for accurate PDF rendering. Multi-line text is supported with automatic <br> tag conversion.

Yes! You can easily add images, logos, signatures, or any graphics to your PDF documents.

How to add images:

  1. Click the "Add Image" button in the toolbar
  2. Select an image file from your computer (PNG, JPG, GIF, etc.)
  3. After uploading, click anywhere on the PDF to place your image
  4. Use the selection handles to move, resize, or rotate the image
  5. Add multiple images by repeating the process

Supported Features:

  • Transparency: PNG images with alpha channels (transparency) are fully supported
  • Scaling: Images are scaled proportionally using scaleX and scaleY properties
  • Base64 Encoding: Images are stored as base64 data URLs for secure processing
  • High Quality: Images are rendered at their original resolution in the final PDF

The checkbox feature allows you to add interactive checkable boxes to your PDF forms and documents.

Adding Checkboxes:

  1. Click the "Add Tick (✓)" button in the toolbar
  2. Click anywhere on the PDF where you want to place the checkbox
  3. The checkbox appears as a square with an X mark inside (checked state)
  4. Toggle: Click the checkbox to toggle between checked and unchecked states
  5. Move and resize the checkbox like any other object

Technical Implementation:

  • Checkboxes are custom Fabric.js group objects containing:
    • A square border (main checkbox frame)
    • Two diagonal lines (the X mark, visible only when checked)
  • Custom Properties: checkboxType, checkboxChecked, checkboxSize
  • Server Rendering: TCPDF renders checkboxes using Rect() for the border and Line() for diagonal marks (only drawn when checked=true)

Yes, the Edit PDF tool is responsive and works on mobile devices (smartphones and tablets), though the experience is optimized for desktop use.

Mobile Capabilities:

  • Touch Gestures: Tap to select objects, drag to move, pinch to resize
  • Full Functionality: All tools (text, image, draw, checkbox) work on mobile
  • Responsive Interface: Toolbar and buttons adapt to smaller screens
  • Page Navigation: Swipe or tap to navigate between pages

Recommendations for Mobile:

  • Use landscape orientation for more screen space
  • Zoom in on the PDF for precise placement of small objects
  • For complex editing tasks, desktop browsers provide better precision

Input Files: The Edit PDF tool accepts only PDF files as input. The file upload field is restricted to application/pdf MIME type.

Image Uploads (for adding to PDFs):

  • PNG (recommended for logos and graphics with transparency)
  • JPG/JPEG (recommended for photos)
  • GIF (supported)
  • BMP and other common image formats

Output: The final output is always a PDF file with your annotations permanently merged onto the original pages. The filename format is edited_[timestamp].pdf, stored temporarily in the /tmp folder before download.

Absolutely! The Edit PDF tool fully supports multi-page PDFs with independent annotation layers for each page.

How Multi-Page Editing Works:

  1. Upload: Upload a PDF with any number of pages
  2. Navigate: Use the Previous/Next Page buttons at the bottom to switch between pages
  3. Edit Each Page: Add text, images, drawings, and annotations to any page
  4. Auto-Save: When you navigate away from a page, your changes are automatically saved to that page's annotation layer
  5. Independent Storage: Each page stores its own annotations as JSON data
  6. Final PDF: Clicking Save processes all pages and merges all annotations into one complete PDF

Storage Structure:

  • Annotations are stored in a structure like: { pages: { "1": { canvasW, canvasH, fabric: JSON }, "2": {...} } }
  • This ensures page-specific edits don't affect other pages

There are two ways to delete objects from your PDF:

Method 1: Delete Individual Objects

  1. Click on the object you want to delete (text, image, drawing, etc.) to select it
  2. You'll see selection handles appear around the object
  3. Press the Delete key or Backspace key on your keyboard
  4. The object will be immediately removed

Method 2: Clear All (Current Page)

  1. Click the "Clear All" button in the toolbar
  2. All annotations on the current page will be removed at once
  3. Other pages are not affected

Important Notes:

  • Deleted objects cannot be recovered (no undo function currently)
  • Clear All only affects the page you're currently viewing
  • To remove annotations from multiple pages, navigate to each page and clear individually

When you click the Save button, your edited PDF is processed and created on the server.

Step-by-Step Process:

  1. Data Collection: The system collects all annotation data from all pages as JSON
  2. Server Transmission: Annotations are sent to the server via AJAX POST request
  3. PDF Import: The server uses FPDI to import your original PDF pages
  4. Annotation Rendering:
    • Text: Rendered using writeHTMLCell() with DejaVu Sans font
    • Images: Rendered using Image() function with base64 decoding
    • Drawings: Converted to SVG and rendered using ImageSVG()
    • Checkboxes: Drawn using Rect() and Line() functions
  5. Coordinate Conversion: Canvas pixels are converted to PDF millimeters using ratio calculations
  6. PDF Creation: Final PDF is created as edited_[timestamp].pdf in /tmp folder
  7. Download: A download link is provided automatically

File Storage: The edited PDF is available for immediate download and is stored temporarily in the /tmp folder for cleanup.

No, we do not permanently store your PDF files. Your privacy and data security are our top priorities.

How We Handle Your Files:

  • Temporary Storage: Your PDF is temporarily stored in the /tmp folder only during your active editing session
  • Processing Only: Files are processed on-demand when you upload and edit them
  • Automatic Cleanup: Temporary files are available for cleanup after download
  • No Access: We do not access, read, or analyze the content of your PDFs
  • No Sharing: Your documents are never shared with third parties
  • No Database Storage: PDFs are not saved in any database

Security Measures:

  • All uploads happen over HTTPS (encrypted connection)
  • File path validation prevents unauthorized access
  • Session-based processing ensures isolation between users

Currently, the Edit PDF tool does not have a built-in undo/redo function. This is a feature we're considering for future updates.

Workarounds:

  • Delete Individual Objects: Select any object and press Delete/Backspace to remove it
  • Clear All: Use the "Clear All" button to remove all annotations from the current page and start fresh
  • Don't Save Yet: If you make mistakes, don't click Save. Simply reload the page to start over with the original PDF
  • Preview First: Always review your changes carefully before clicking the Save button

Best Practices:

  • Work on one page at a time and review it before moving to the next
  • Keep a backup of your original PDF before editing
  • For complex edits, save intermediate versions as you progress

The Edit PDF tool uses cutting-edge web technologies and PDF libraries to deliver a smooth editing experience.

Frontend Technologies:

  • PDF.js (v2.16.105): Mozilla's PDF rendering library for displaying PDF pages in the browser canvas
  • Fabric.js (v5.2.4): Interactive canvas library for object manipulation, selection, and drawing
  • JavaScript (ES6+): Modern JavaScript for interactive functionality
  • CSS3: Responsive styling and animations

Backend Technologies:

  • FPDI with TCPDF (PHP): Server-side PDF processing and generation
  • DejaVu Sans Font: Unicode-compatible font for international character support
  • PHP 7.4+: Server-side processing and file handling

Key Technical Features:

  • Canvas Overlay System: Fabric.js canvas positioned absolutely over PDF.js rendered pages with z-index management
  • Coordinate Synchronization: Real-time syncing of canvas position with PDF rendering
  • Pixel-to-MM Conversion: Accurate conversion between canvas coordinates and PDF measurements
  • JSON Serialization: Custom properties (like checkbox state) serialized with Fabric's toJSON()
  • SVG Rendering: Freehand drawings converted to inline SVG for PDF embedding