def to_pdf_data
      pdf_data = header

      @data.each do |key, value|
        if Hash === value
          value.each do |sub_key, sub_value|
            pdf_data << field("#{key}_#{sub_key}", sub_value)
          end
        else
          pdf_data << field(key, value)
        end
      end

      pdf_data << footer
      return encode_data(pdf_data)
    end
def to_pdf_data
      pdf_data = header

      @data.each do |key, value|
        if Hash === value
          value.each do |sub_key, sub_value|
            pdf_data << field("#{key}_#{sub_key}", sub_value)
          end
        else
          pdf_data << field(key, value)
        end
      end

      pdf_data << footer
      return encode_data(pdf_data)
    end
generate PDF content in this data format