···55## Features
6677- Downloads all 340 pages (SVG text layers + high-res WebP images)
88-- Composites layers with proper font rendering
99-- Creates high-quality PDF (1045x1350 pixels per page)
1010-- Optional: Add searchable text with OCR
88+- **Creates true vector PDF** with embedded custom fonts using Playwright Print-to-PDF
99+- Text is **perfectly sharp** at any zoom level and fully **selectable/searchable**
1010+- Fast: ~15-20 minutes total (download + PDF creation)
1111+- Final PDF: ~62 MB with 340 high-quality pages
11121213## Quick Start
1314···5152python create_pdf.py
5253```
53545454-Composites SVG + WebP and creates `Invitation_to_Cybersecurity.pdf`
5555-5656-### 4. Add OCR (Optional)
5757-5858-```bash
5959-brew install ocrmypdf
6060-ocrmypdf Invitation_to_Cybersecurity.pdf Invitation_to_Cybersecurity_OCR.pdf
6161-```
6262-6363-Creates a version with selectable/searchable text.
5555+Creates `Invitation_to_Cybersecurity.pdf` using Playwright's Print-to-PDF:
5656+- Each page rendered as vector PDF with embedded fonts
5757+- High-res WebP images as backgrounds
5858+- SVG text preserved as vectors (sharp at any zoom!)
5959+- Fully selectable and searchable text
6060+- Takes ~10-15 minutes
64616562## Requirements
6663···70677168## Output
72697373-- **Invitation_to_Cybersecurity.pdf** - 340 pages, ~70-80 MB, high quality
7474-- **Invitation_to_Cybersecurity_OCR.pdf** - Same as above + searchable text (optional)
7070+- **Invitation_to_Cybersecurity.pdf** - 340 pages, ~62 MB, true vector text with embedded custom fonts!
75717672## File Structure
7773
+7-30
build.sh
···5454fi
55555656# Step 5: Create PDF
5757-echo -e "${BLUE}[Step 5/6] Creating PDF from layers...${NC}"
5757+echo -e "${BLUE}[Step 5/5] Creating PDF with vector text...${NC}"
5858if [ ! -f "Invitation_to_Cybersecurity.pdf" ]; then
5959- echo "This will composite SVG + WebP and create the PDF"
6060- echo "Estimated time: 8-10 minutes"
5959+ echo "This will create PDF with embedded vector text"
6060+ echo "Estimated time: 30-60 seconds"
6161 echo ""
6262 python create_pdf.py
6363- echo -e "${GREEN}✓ PDF created successfully${NC}"
6363+ echo -e "${GREEN}✓ PDF created with selectable text!${NC}"
6464else
6565 echo "✓ PDF already exists"
6666 read -p "Recreate PDF? (y/N): " recreate
···7171 fi
7272fi
73737474-# Step 6: Add OCR text layer (optional)
7575-echo -e "${BLUE}[Step 6/6] Adding OCR text layer (optional)...${NC}"
7676-if command -v ocrmypdf &> /dev/null; then
7777- if [ ! -f "Invitation_to_Cybersecurity_OCR.pdf" ]; then
7878- read -p "Add searchable text layer with OCR? This will take 30-60 minutes. (y/N): " add_ocr
7979- if [[ $add_ocr =~ ^[Yy]$ ]]; then
8080- echo "Running OCR (this will take a while)..."
8181- ocrmypdf --force-ocr Invitation_to_Cybersecurity.pdf Invitation_to_Cybersecurity_OCR.pdf
8282- echo -e "${GREEN}✓ OCR PDF created with selectable text${NC}"
8383- else
8484- echo "Skipped OCR step"
8585- fi
8686- else
8787- echo "✓ OCR PDF already exists"
8888- fi
8989-else
9090- echo "⚠ ocrmypdf not installed. To add selectable text, run:"
9191- echo " brew install ocrmypdf"
9292- echo " ocrmypdf Invitation_to_Cybersecurity.pdf Invitation_to_Cybersecurity_OCR.pdf"
9393-fi
9494-9574echo ""
9675echo -e "${GREEN}================================================${NC}"
9776echo -e "${GREEN}✓ Complete!${NC}"
···10079echo "Output files:"
10180if [ -f "Invitation_to_Cybersecurity.pdf" ]; then
10281 SIZE=$(du -h "Invitation_to_Cybersecurity.pdf" | cut -f1)
103103- echo " 📄 Invitation_to_Cybersecurity.pdf ($SIZE)"
104104-fi
105105-if [ -f "Invitation_to_Cybersecurity_OCR.pdf" ]; then
106106- SIZE=$(du -h "Invitation_to_Cybersecurity_OCR.pdf" | cut -f1)
107107- echo " 📄 Invitation_to_Cybersecurity_OCR.pdf ($SIZE) [with selectable text]"
8282+ echo " 📄 Invitation_to_Cybersecurity.pdf ($SIZE) [vector text + high-res images]"
10883fi
10984echo ""
8585+echo "✨ Text is embedded as vectors - selectable and searchable!"
8686+echo ""