You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: form1095_b.rb
    path of file: ./repos/vets-api/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Form1095B < ApplicationRecord
  has_kms_key
  has_encrypted :form_data, key: :kms_key, **l
    
  def pdf_file
    pdftk = PdfForms.new(Settings.binaries.pdftk)

    tmp_file = Tempfile.new("1095B-#{SecureRandom.hex}.pdf")

    unless File.exist?(pdf_template_path)
      Rails.logger.error "1095-B template for year #{tax_year} does not exist."
      raise "1095-B for tax year #{tax_year} not supported"
    end

    generate_pdf(pdftk, tmp_file)
  end