A powerful web-based file converter built with Django that supports multiple document and image conversions using LibreOffice, Poppler, and Python-based processing libraries.
File Converter Django adalah aplikasi berbasis web yang memungkinkan pengguna melakukan konversi file langsung melalui browser. Project ini dirancang untuk: βοΈ Cepat βοΈ Stabil βοΈ 100% Self-hosted βοΈ Tidak menggunakan API berbayar βοΈ Cocok untuk production & shared hosting (dengan penyesuaian)
JPG β PDF Word β PDF Excel β PDF PowerPoint β PDF
PDF β JPG PDF β Word PDF β Excel PDF β PowerPoint
Python 3 Django LibreOffice (Headless mode) Poppler Pillow pdf2image pdf2docx pdfplumber openpyxl python-pptx OpenCV NumPy
Pastikan sistem Anda memiliki: Software Required Python 3.9+ β pip β LibreOffice β Poppler β Git β
Buka CMD / Terminal:
git clone https://github.com/derilkrisyanto/file-converter-django.git cd file-converter-django
Pastikan Python terinstall: python --version pip --version
Jika belum ada, download dari: π https://www.python.org/downloads/
Saat install Python: βοΈ Centang Add Python to PATH
Di dalam folder project: python -m venv venv
Aktifkan
- Windows: venv\Scripts\activate
- Mac/Linux: source venv/bin/activate
Jika berhasil, akan muncul: (venv)
Jalankan: pip install django pip install rembg pip install opencv-python pip install numpy pip install pillow pip install pdf2image pdf2docx pdfplumber openpyxl python-pptx
Atau jika tersedia requirements.txt:
pip install -r requirements.txt
Download: π https://www.libreoffice.org/download/download/
Install seperti biasa.
Setelah install, pastikan lokasi: C:\Program Files\LibreOffice\program\soffice.exe
Jika berbeda, ubah di file: myapp/services/file_converter.py
Bagian: SOFFICE_PATH = r"C:\Program Files\LibreOffice\program\soffice.exe"
Download Poppler Windows binary: π https://github.com/oschwartz10612/poppler-windows/releases
Ekstrak ke: C:\poppler-xx\
Contoh: C:\poppler-25.12.0\
Lalu pastikan path berikut benar di: POPPLER_PATH = r"C:\poppler-25.12.0\Library\bin"
Jika berbeda, sesuaikan.
Jika Anda clone project lengkap, lewati langkah ini.
Jika setup manual: django-admin startproject core . python manage.py startapp myapp
Tambahkan di: core/settings.py INSTALLED_APPS = [ ... 'myapp', ]
Tambahkan di core/settings.py: import os
STATIC_URL = 'static/' STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_DIRS = [ BASE_DIR / 'myapp' / 'static', ]
core/urls.py from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static
urlpatterns = [ path('admin/', admin.site.urls), path('', include('myapp.urls')), ]
if settings.DEBUG: urlpatterns += static('media/file_converter/', document_root='media/file_converter') myapp/urls.py from django.urls import path from . import views
urlpatterns = [ path("", views.file_converter, name="file_converter"), path("cv/process/", views.converter_process), path("cv/file/str:filename/", views.converter_download), path("cv/cleanup/", views.converter_cleanup), ]
python manage.py migrate
python manage.py createsuperuser
python manage.py collectstatic
python manage.py runserver
Buka browser: http://127.0.0.1:8000/
Admin panel: http://127.0.0.1:8000/admin/
Office β PDF Menggunakan LibreOffice headless mode.
PDF β JPG Menggunakan Poppler + pdf2image.
PDF β Word Menggunakan pdf2docx.
PDF β Excel Menggunakan pdfplumber + openpyxl.
PDF β PowerPoint Menggunakan Poppler convert page β image β slide.
File disimpan sementara di media/file_converter/ File otomatis dihapus setelah download Tidak ada penyimpanan permanen
βοΈ 100% self-hosted βοΈ Tidak perlu API eksternal βοΈ Mendukung banyak format βοΈ UI modern βοΈ Mudah dikembangkan βοΈ Cocok untuk server lokal maupun VPS
Error: LibreOffice failed Pastikan path SOFFICE_PATH benar
Coba test manual di CMD: "C:\Program Files\LibreOffice\program\soffice.exe" --version Error: Poppler not found
Pastikan POPPLER_PATH benar Pastikan folder Library/bin ada file .dll
file-converter-django/ β βββ core/ βββ myapp/ β βββ services/ β βββ static/ β βββ templates/ β βββ views.py β βββ urls.py β βββ media/ βββ manage.py βββ README.md
Open-source project for educational and production use.
Developed with Django & Python.