File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ def ups_send_shipping(self, pickings):
162162 return [self .ups_create_shipping (p ) for p in pickings ]
163163
164164 def _convert_gif_to_pdf (self , gif_data ):
165- """Convert GIF image data to PDF format
165+ """Convert GIF image data to PDF format with proper 6x4" page size
166166 :param gif_data: base64 encoded GIF data
167167 :returns: base64 encoded PDF data
168168 """
@@ -171,7 +171,8 @@ def _convert_gif_to_pdf(self, gif_data):
171171 image_string = io .BytesIO (img_decoded )
172172 im = Image .open (image_string )
173173 label_result = io .BytesIO ()
174- im .save (label_result , 'PDF' )
174+ # Set resolution to 236 DPI (standard for 6x4" UPS labels)
175+ im .save (label_result , 'PDF' , resolution = 236.0 )
175176 return base64 .b64encode (label_result .getvalue ()).decode ('utf-8' )
176177
177178 def _prepare_ups_label_attachment (self , picking , values ):
You can’t perform that action at this time.
0 commit comments