ALFAHIM Group is one of the UAE’s most successful family businesses. The company was founded by the late Abdul Jalil Al Fahim in 1958, a visionary entrepreneur who led the company until his passing in 1996.
Our HistoryALFAHIM Group constantly seeks to grow and build its status as a major contributor to the socio-economic development of the UAE.The group has evolved into a dynamic and diversified organization with a global footprint. Our commitment to delivering quality, sustainability, and customer satisfaction has been the cornerstone of our success.
With Head Offices in Fairmont Bab Al Bahr in Abu Dhabi and Sheikh Zayed Road in Dubai, ALFAHIM Group has grown in line with the development of the UAE.
About UsA diverse conglomerate with business interest spanning multiple industries. Our dynamic portfolio of businesses is united by a commitment to quality, sustainability, and customer satisfaction.
Goal: Generate a professional PDF catalogue listing package units (model, specs, image, performance data).
def generate_catalogue(self, units, output_file="gami_catalogue.pdf"): self.add_cover() for unit in units: self.add_product_page(unit) self.output(output_file) print(f"Catalogue saved as {output_file}") def load_units_from_json(json_file): with open(json_file, "r") as f: data = json.load(f) return data["units"] gami package unit catalogue pdf
unit = { "model": "GAMI-PAC-24", "capacity_btu": 24000, "cooling_kw": 7.0, "heating_type": "Electric / Heat Pump", "efficiency_seer": 16.5, "voltage": "208-230/1/60", "weight_lbs": 185, "dimensions_in": "32x24x38", "image_path": "images/gami_pac_24.jpg", "features": ["Low noise", "R-410A", "Thermostat included"] } Create catalogue_generator.py : Goal: Generate a professional PDF catalogue listing package
def add_cover(self): self.add_page() self.set_font("Arial", "B", 24) self.cell(0, 60, "", 0, 1) self.cell(0, 20, "GAMI", 0, 1, "C") self.set_font("Arial", "B", 18) self.cell(0, 15, "Package Unit Catalogue", 0, 1, "C") self.set_font("Arial", "", 12) self.cell(0, 10, "Commercial & Residential HVAC Solutions", 0, 1, "C") self.ln(20) self.set_font("Arial", "I", 10) self.cell(0, 10, f"Valid from {self.get_current_date()}", 0, 1, "C") performance data). def generate_catalogue(self
@app.route("/generate_catalogue", methods=["POST"]) def generate(): data = request.get_json() units = data["units"] pdf = GAMICatalogue() pdf.generate_catalogue(units, "temp.pdf") return send_file("temp.pdf", as_attachment=True, download_name="gami_catalogue.pdf")
from fpdf import FPDF import json from PIL import Image import os class GAMICatalogue(FPDF): def header(self): if self.page_no() > 1: self.set_font("Arial", "B", 12) self.cell(0, 10, "GAMI Package Unit Catalogue", 0, 1, "C") self.ln(5)
Copyright © 2023 AL FAHIM GROUP – All Rights Reserved. | Terms of Use | Staff Webmail