Documentation

AI PDF Extractor

Installation, setup instructions, requirements, and configuration help.

Product Overview

AI PDF Extractor is a self-hosted PHP/MySQL document-processing application designed to turn text-based PDF files into accessible, reusable text.

The application provides a focused workflow for uploading PDF documents, extracting readable content, reviewing extraction results, organizing stored documents, downloading original files, and deleting records that are no longer needed.

Because the application is self-hosted, your files and extracted content remain within the hosting environment and database you control.

COMMON USE CASES

- Extract text from reports, manuals, proposals, and contracts
- Review lengthy PDF content without repeatedly opening the source file
- Copy extracted text into internal notes, knowledge bases, or content workflows
- Maintain an organized library of uploaded documents
- Prepare machine-readable document text for later analysis or AI-assisted workflows
- Keep sensitive business documents within your own hosting environment

System Requirements

Before installation, confirm that your hosting environment provides the following:

- PHP 8.1 or newer
- MySQL 5.7+ or MariaDB
- PDO MySQL extension enabled
- File uploads enabled
- Sufficient upload, memory, execution-time, and storage limits for your PDFs
- Writable application storage directory
- SSL/HTTPS strongly recommended
- A supported server-side PDF text extraction utility or library as included/configured by the product

IMPORTANT SERVER SETTINGS

Large PDF uploads may require adjustments to:

- upload_max_filesize
- post_max_size
- memory_limit
- max_execution_time
- max_input_time

Your hosting provider controls the maximum values available on your account.

Installation Guide

1. Download and unzip the AI PDF Extractor package.

2. Upload the application files to the desired directory on your hosting account.

3. Create a new MySQL or MariaDB database and database user.

4. Copy config.example.php to config.php.

5. Open config.php and enter your database credentials, application URL, administrator information, and storage settings.

6. Confirm that the configured storage directory exists and is writable by PHP.

7. Visit install.php in your browser.

8. Follow the installer instructions to create the database tables and administrator account.

9. Log in and upload a small text-based PDF to verify extraction, storage, viewing, and downloading.

10. After installation is complete, delete or rename install.php unless the application automatically protects it.

11. Enable HTTPS and confirm that sensitive configuration files cannot be downloaded through the browser.

Configuration

The primary application settings are stored in config.php. Exact option names may vary by release.

DATABASE
Configure the database host, database name, username, password, and character set.

APPLICATION URL
Set the full URL where AI PDF Extractor is installed. Use HTTPS whenever possible.

ADMINISTRATOR
Configure the initial administrator name, email address, and a strong password during installation.

FILE STORAGE
Confirm the directory used for uploaded PDFs. The directory must be writable by PHP and should be protected from unauthorized direct browsing.

UPLOAD LIMITS
Application limits cannot exceed the PHP and hosting limits configured by your server.

PDF EXTRACTION
Confirm that the PDF extraction component included or required by your release is available on the server. Some shared hosts restrict command-line utilities, so verify compatibility before deployment.

Uploading a PDF

1. Log in to the AI PDF Extractor dashboard.

2. Open the document upload page.

3. Select a PDF file from your computer.

4. Confirm the selected filename and submit the upload.

5. The application validates the request, stores the PDF, creates its document record, and attempts to extract readable text.

6. When processing is complete, open the document record to review the result.

UPLOAD RECOMMENDATIONS

- Begin with a small, known text-based PDF when testing a new installation.
- Avoid password-protected or encrypted files unless your installed version explicitly supports them.
- Use clear filenames that help identify the document later.
- Do not close the browser while a large document is still processing.
- Confirm that your server has enough available storage before uploading large document collections.

Understanding Extraction Results

A successful extraction displays the machine-readable text found inside the PDF.

WHAT TO EXPECT

- Paragraph text is generally extracted in reading order.
- Page breaks may be represented as spacing or line breaks.
- Headers and footers may appear repeatedly.
- Multi-column documents may not follow the visual reading order perfectly.
- Tables may be converted into plain lines of text rather than rows and columns.
- Special symbols and embedded fonts may produce imperfect characters.

NO READABLE TEXT FOUND

This result usually means the PDF is scanned, image-only, protected, malformed, or created with content that the extraction engine cannot interpret. A normal PDF viewer can display an image of words even when the file contains no machine-readable text. OCR is required to convert those images into text.

Managing the Document Library

The document library is the central workspace for previously uploaded PDFs.

Depending on your installed release, document records may display:

- Original filename
- Stored filename or storage reference
- Upload date
- File size
- Extraction status
- Extracted text preview
- Download action
- Delete action

Use descriptive filenames before upload so records are easy to recognize. Periodically remove test files, duplicates, and documents that are no longer needed. Always confirm that important originals are backed up before deletion.

Downloading Original Documents

AI PDF Extractor can provide authorized access to the original stored PDF from its document record.

If a download fails, verify the following:

1. The database record contains the correct storage path.
2. The PDF still exists in the configured storage directory.
3. PHP has permission to read the file.
4. The storage path uses the correct absolute or application-relative location.
5. The filename has not been manually changed outside the application.
6. Server security rules are not blocking the download handler.

For security, downloads should be served through the application rather than exposing private storage folders directly.

Deleting Documents Safely

Use the application delete action when a PDF and its extracted text are no longer needed.

Before deleting:

- Confirm that the correct document is selected.
- Download or back up the original if it may be needed later.
- Confirm whether deletion removes only the database record or both the record and stored file in your installed release.

A complete deletion workflow should validate administrator authorization, protect against forged requests, remove the database record, remove the stored file when appropriate, and record or report any file-system error.

Text-Based PDFs and Scanned PDFs

TEXT-BASED PDF
A text-based PDF contains actual characters that can normally be selected, copied, and searched in a PDF viewer. These documents provide the best extraction results.

SCANNED OR IMAGE-ONLY PDF
A scanned PDF contains page images rather than normal text. The words may be visible to a person but are not directly readable by a text extraction engine.

HOW TO CHECK
Open the PDF and try to select an individual sentence. If only the entire page image can be selected, the document probably requires OCR.

OCR
Optical Character Recognition analyzes document images and attempts to identify letters and words. OCR is a separate, more resource-intensive process and may not be included in the core extractor unless explicitly stated for your product version.

Security Recommendations

AI PDF Extractor may hold confidential business documents. Treat the installation as a protected business system.

RECOMMENDED PRACTICES

- Use HTTPS for the entire application.
- Use a unique, strong administrator password.
- Keep config.php outside public access whenever your hosting structure allows it.
- Block direct web access to private storage directories.
- Validate PDF file type, extension, MIME type, and upload errors.
- Generate safe internal storage filenames rather than trusting user filenames.
- Use prepared PDO statements for database operations.
- Require authenticated authorization for viewing, downloading, and deleting documents.
- Use CSRF protection for upload and delete actions.
- Keep PHP, the database server, and the application updated.
- Back up the database and stored documents.
- Never expose detailed server paths or stack traces to public visitors.

Backup and Maintenance

A complete backup should include both the MySQL/MariaDB database and the directory containing uploaded PDFs. Backing up only one of these components can leave document records without files or files without their associated records.

RECOMMENDED ROUTINE

- Back up the database regularly.
- Back up the configured document storage directory.
- Test restoration procedures before they are needed.
- Review available server storage space.
- Remove obsolete test documents.
- Check application and PHP error logs for failed extractions or downloads.
- Verify that storage permissions have not changed after hosting migrations.
- Install product updates only after creating a current backup.

Troubleshooting

UPLOAD FAILS
Check upload_max_filesize, post_max_size, storage permissions, available disk space, and the application upload limit.

NO READABLE TEXT FOUND
Confirm that the PDF contains selectable text. Scanned documents require OCR. Also check whether the file is encrypted, damaged, or uses unsupported embedded fonts.

EXTRACTION TAKES TOO LONG
Try a smaller PDF and review max_execution_time, memory_limit, server CPU restrictions, and the extraction component configuration.

ORIGINAL PDF CANNOT BE DOWNLOADED
Confirm that the stored file exists and that the database storage path matches its actual location. Verify PHP read permissions.

DATABASE ERROR
Confirm the database credentials, PDO MySQL availability, imported schema, and database user privileges.

BLANK PAGE OR SERVER ERROR
Enable application logging in a private environment, inspect the PHP error log, and confirm that your PHP version satisfies the requirements. Do not display detailed errors publicly on a production installation.

Best Practices

Use AI PDF Extractor as an organized document intake and text-access workflow rather than as a replacement for the original PDF.

- Keep the original PDF as the authoritative source.
- Review extracted text before relying on it for legal, financial, medical, or contractual decisions.
- Use consistent, descriptive filenames.
- Separate test documents from production documents.
- Back up both database records and stored files.
- Remove confidential documents when they are no longer required.
- Confirm extraction quality before copying content into another system.
- Treat AI-ready text as source material that still requires human review.
- Follow applicable privacy, retention, and data-protection requirements for the documents you upload.