def self.generate_code_128B(barcode_seed)
file_name = "barcode-code128b-#{barcode_seed}.png"
file_local_url = @@BARCODE_FOLDER + file_name
file_web_url = @@BARCODE_FOLDER_URL + file_name
FileUtils::mkdir_p @@BARCODE_FOLDER
if !File.exist?(file_local_url)
barcode = Barby::Code128B.new(barcode_seed)
File.open(file_local_url, 'w'){|f|
f.write barcode.to_png(:height => 40, :margin => 5)
}
end
return file_web_url
end
This is the function i used to write the pdf