doc: updated README language
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
# DropSign
|
||||
|
||||
Drag & Drop – PDFs cryptographically signieren.
|
||||
Drag & drop - cryptographically sign PDFs.
|
||||
|
||||
Ein PHP-Einzeldatei-Tool, das per Drag & Drop hochgeladene PDFs mit einem X.509-Zertifikat digital signiert und das signierte PDF zum Download bereitstellt.
|
||||
A single-file PHP tool that digitally signs uploaded PDFs with an X.509 certificate and serves the signed PDF for download.
|
||||
|
||||
## Voraussetzungen
|
||||
## Requirements
|
||||
|
||||
- PHP ≥ 7.4 mit den Extensions `openssl`, `gd`, `mbstring`
|
||||
- PHP ≥ 7.4 with extensions `openssl`, `gd`, `mbstring`
|
||||
- Composer
|
||||
- Ein gültiges Signaturzertifikat (PKCS#12 `.p12` oder separiert als PEM)
|
||||
- A valid signing certificate (PKCS#12 `.p12` or separate PEM files)
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -18,11 +18,11 @@ cd dropsign
|
||||
composer install
|
||||
```
|
||||
|
||||
## Konfiguration
|
||||
## Configuration
|
||||
|
||||
`.env` anlegen (oder `.env.example` kopieren und anpassen):
|
||||
Create a `.env` file (or copy `.env.example` and adjust):
|
||||
|
||||
### Variante A – PEM (getrennt)
|
||||
### Option A - PEM (separate files)
|
||||
|
||||
```env
|
||||
CERT_FILE=fullchain6.pem
|
||||
@@ -30,14 +30,14 @@ PRIVKEY_FILE=privkey.pem
|
||||
PRIVKEY_PASSWORD=
|
||||
```
|
||||
|
||||
### Variante B – PKCS#12 (z. B. von Let's Encrypt / Hausverwaltung)
|
||||
### Option B - PKCS#12 (e.g. from Let's Encrypt / certificate authority)
|
||||
|
||||
```env
|
||||
PKCS12_FILE=certificate.p12
|
||||
PKCS12_PASSWORD=dein-password
|
||||
PKCS12_PASSWORD=your-password
|
||||
```
|
||||
|
||||
### Signatur-Metadaten (optional)
|
||||
### Signature metadata (optional)
|
||||
|
||||
```env
|
||||
SIGNATURE_NAME=John Doe
|
||||
@@ -46,19 +46,19 @@ SIGNATURE_LOCATION=Berlin, Germany
|
||||
SIGNATURE_CONTACT=john@example.com
|
||||
```
|
||||
|
||||
## Verwendung
|
||||
## Usage
|
||||
|
||||
### Entwicklung
|
||||
### Development
|
||||
|
||||
```bash
|
||||
php -S localhost:8000
|
||||
```
|
||||
|
||||
→ Browser öffnen, PDF hineinziehen – signiertes PDF wird heruntergeladen.
|
||||
→ Open the browser, drop a PDF - the signed PDF is downloaded automatically.
|
||||
|
||||
### Produktion (nginx)
|
||||
### Production (nginx)
|
||||
|
||||
Dokumenten-Wurzel auf das Projektverzeichnis zeigen lassen, **nur `index.php` und `.pdf`-Dateien** freigeben:
|
||||
Point the document root to the project directory, **allow only `index.php` and `.pdf` files**:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
@@ -68,7 +68,7 @@ server {
|
||||
ssl_certificate /etc/letsencrypt/live/…/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/…/privkey.pem;
|
||||
|
||||
root /pfad/zu/dropsign;
|
||||
root /path/to/dropsign;
|
||||
index index.php;
|
||||
|
||||
location = / {
|
||||
@@ -93,12 +93,12 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
> `.env`, `composer.json`, `vendor/`, `*.pem`, `*.key`, `*.p12` etc. sind damit automatisch geschützt.
|
||||
> `.env`, `composer.json`, `vendor/`, `*.pem`, `*.key`, `*.p12` etc. are automatically protected this way.
|
||||
|
||||
## Funktionsweise
|
||||
## How it works
|
||||
|
||||
1. Der Benutzer zieht eine PDF-Datei per Drag & Drop in die Weboberfläche.
|
||||
2. Die PDF wird per `fetch`-POST an `index.php` gesendet.
|
||||
3. Das Script importiert jede Seite der Original-PDF via FPDI in TCPDF.
|
||||
4. TCPDF signiert das neue PDF mit dem hinterlegten Zertifikat (PEM oder PKCS#12).
|
||||
5. Das signierte PDF wird als `signed_<originalname>.pdf` heruntergeladen.
|
||||
1. The user drags & drops a PDF onto the web interface.
|
||||
2. The PDF is sent via `fetch` POST to `index.php`.
|
||||
3. The script imports each page of the original PDF using FPDI into TCPDF.
|
||||
4. TCPDF signs the new PDF with the configured certificate (PEM or PKCS#12).
|
||||
5. The signed PDF is downloaded as `signed_<original-name>.pdf`.
|
||||
|
||||
Reference in New Issue
Block a user