Format Conversion100% private
Text to PDF Converter
Convert plain text files to properly formatted PDF documents with one click.
20 lines · 474 chars
1#!/bin/bash
2# Database backup script
3# Run daily at 2 AM via cron
4
5set -euo pipefail
6
7BACKUP_DIR="/var/backups/postgres"
8DATE=$(date +%Y%m%d_%H%M%S)
9DB_NAME="production"
10
11echo "Starting backup for $DB_NAME..."
12
13pg_dump $DB_NAME | gzip > "$BACKUP_DIR/$DB_NAME_$DATE.sql.gz"
14
15# Keep only last 7 days of backups
16find $BACKUP_DIR -name "*.sql.gz" -mtime +7 -delete
17
18echo "Backup complete: $DB_NAME_$DATE.sql.gz"
19echo "Size: $(du -h $BACKUP_DIR/$DB_NAME_$DATE.sql.gz | cut -f1)"
20
The PDF uses a monospace font to preserve code alignment and indentation. Text is vector-based - searchable and selectable.
How it works
- 1Paste or type your textDrop in plain text - code, logs, notes, or any monospace-friendly content.
- 2Preview & convertSee the text with line numbers, then export to PDF.
- 3Download the PDFYour PDF downloads immediately with selectable text and proper formatting.
Frequently asked questions
Why use a monospace font?
Text files - especially code, logs, and terminal output - rely on fixed-width alignment. A monospace font preserves column alignment and indentation.
Is the text selectable in the PDF?
Yes. This tool uses pdfmake to generate a vector PDF with real selectable text, not a screenshot.
What's the difference between this and Markdown to PDF?
Text to PDF is for plain text - it preserves the raw content as-is. Markdown to PDF interprets formatting syntax and renders it with styled typography.