Skip to content

Instantly share code, notes, and snippets.

@samirsaci
Created October 1, 2022 16:32
Show Gist options
  • Save samirsaci/3e3e8261cb19c5fbbb05e8b704b865d7 to your computer and use it in GitHub Desktop.
Save samirsaci/3e3e8261cb19c5fbbb05e8b704b865d7 to your computer and use it in GitHub Desktop.
Graphic Information
# Import libaries
from PIL import Image
import pandas as pd
from PIL import Image, ImageOps, ImageDraw
from PIL import ImageFont
from barcode import EAN13
from barcode.writer import ImageWriter
# Import the file
df = pd.read_excel('label information.xlsx')
# Start the loop
for index, row in df.iterrows():
# Create White Canvas with border
bg = Image.new('RGBA', (500, 200), color = (255, 255, 255))
bg = ImageOps.expand(bg,border=1,fill='black')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment