pdf / BUILD_FIXES_SUMMARY.md
fokan's picture
Upload 54 files
0134048 verified

Build Fixes Summary

Problem Identified

The Docker build was failing with:

E: Unable to locate package fonts-scheherazade-new

Root Cause

The package fonts-scheherazade-new is not available in Ubuntu 22.04 (jammy), it's only available in Ubuntu 24.04 (noble) and later versions.

Solution Implemented

  1. Fixed Package Name: Changed fonts-scheherazade-new to fonts-scheherazade which is the correct package name for Ubuntu 22.04
  2. Updated Cairo Font URL: Changed to a more reliable source for Cairo font installation
  3. Maintained Compatibility: Kept Ubuntu 22.04 as the base image to ensure compatibility with Hugging Face Spaces

Changes Made

Dockerfile

  • Replaced fonts-scheherazade-new with fonts-scheherazade
  • Kept all other packages and configuration the same
  • Maintained Java-disabling environment variables
  • Preserved unoconv installation for fallback conversion

app.py

  • Updated Cairo font URL to a more reliable source
  • Kept all other Java-disabling logic and fallback mechanisms

Expected Results

These changes should resolve the build error and allow the Docker image to build successfully while maintaining all the Java-disabling and fallback conversion features.

Verification Steps

  1. Rebuild the Docker image
  2. Verify the image builds without errors
  3. Test document conversion to ensure all functionality works
  4. Check that Java is properly disabled
  5. Verify font installation works correctly

Additional Notes

  • The fonts-scheherazade package provides the Scheherazade font which is suitable for Arabic text rendering
  • The fallback mechanisms for conversion (LibreOffice → unoconv) remain in place
  • All Java-disabling features are preserved
  • Font installation improvements should provide better Arabic text support