1<?php 2 3namespace jucksearm\barcode; 4 5use jucksearm\barcode\lib\PDF417Factory; 6 7class PDF417 8{ 9 public static function factory() { 10 return new PDF417Factory(); 11 } 12 13 public static function html( 14 $code, 15 $size = null, 16 $margin = null, 17 $color = null 18 ) { 19 $pdf417Factory = self::factory() 20 ->setCode($code) 21 ->setSize($size) 22 ->setMargin($margin) 23 ->setColor($color) 24 ->renderHTML(); 25 } 26 27 public static function png( 28 $code, 29 $file = null, 30 $size = null, 31 $margin = null, 32 $color = null 33 ) { 34 $pdf417Factory = self::factory() 35 ->setCode($code) 36 ->setFile($file) 37 ->setSize($size) 38 ->setMargin($margin) 39 ->setColor($color) 40 ->renderPNG(); 41 } 42 43 public static function svg( 44 $code, 45 $file = null, 46 $size = null, 47 $margin = null, 48 $color = null 49 ) { 50 $pdf417Factory = self::factory() 51 ->setCode($code) 52 ->setFile($file) 53 ->setSize($size) 54 ->setMargin($margin) 55 ->setColor($color) 56 ->renderSVG(); 57 } 58}