Yash goyal commited on
Commit
07ec449
·
verified ·
1 Parent(s): 4dbaa57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -160,17 +160,17 @@ def generate_pdf(report, filepath):
160
  c.setFillColor(colors.Color(0.94, 0.96, 0.98, alpha=1))
161
  c.rect(0, height-120, width, 120, fill=1, stroke=0)
162
 
163
- # Logo from root directory
164
  try:
165
- logo_path = "./logo.jpg" # Changed to root directory
166
  if os.path.exists(logo_path):
167
- # Professional logo container
168
  c.setFillColor(colors.white)
169
- c.circle(90, y, 30, fill=1, stroke=1)
170
  c.setStrokeColor(colors.Color(0.7, 0.7, 0.7, alpha=1))
171
  c.setLineWidth(1)
172
- c.circle(90, y, 30, fill=0, stroke=1)
173
- c.drawImage(logo_path, 65, y-20, width=50, preserveAspectRatio=True, mask='auto')
174
  except Exception as e:
175
  logger.warning("Logo error: %s", str(e))
176
 
 
160
  c.setFillColor(colors.Color(0.94, 0.96, 0.98, alpha=1))
161
  c.rect(0, height-120, width, 120, fill=1, stroke=0)
162
 
163
+ # Logo from root directory - square JPG format
164
  try:
165
+ logo_path = "./logo.jpg" # Changed to JPG format
166
  if os.path.exists(logo_path):
167
+ # Square logo container - no circular mask since logo is square
168
  c.setFillColor(colors.white)
169
+ c.rect(65, y-25, 50, 50, fill=1, stroke=1) # Square container
170
  c.setStrokeColor(colors.Color(0.7, 0.7, 0.7, alpha=1))
171
  c.setLineWidth(1)
172
+ c.rect(65, y-25, 50, 50, fill=0, stroke=1) # Square border
173
+ c.drawImage(logo_path, 67, y-23, width=46, height=46, preserveAspectRatio=True, mask='auto')
174
  except Exception as e:
175
  logger.warning("Logo error: %s", str(e))
176