def print_section(section_name, values = nil, group = false)
            section = !group ? @sections[section_name] : @sections[:groups][section_name]
            set_pos_y(section[:settings][:posY] || 0) unless section_name.eql?(:body) || section[:settings].nil?
            new_page if @posY < 30

            if section_name.eql? :body and @count % 2 != 0
                @pdf.fill_color "F7F7F7"
                width = @options[:page_layout] == :portrait ? 530 : 770
                @pdf.fill_rectangle [0, @posY+(section[:settings][:height]/2)], width, section[:settings][:height]
            end

            section[:fields].each do |field, settings|
                symbolize! settings[1] unless settings[1].nil?
                set_pos_y settings[1][:posY] unless settings[1].nil? || settings[1][:posY].nil?
                settings = [settings[0], @posY, (@defaults.merge (settings[1] || { }))]
                settings[2][:style] = settings[2][:style].to_sym
                set_options settings[2]

                value = set_value values, settings, section_name, field, group                
                draw_text value, settings
            end
            set_pos_y (section[:settings][:height]) unless section[:settings].nil? || section[:settings][:height].nil?
        end
def print_section(section_name, values = nil, group = false)
            section = !group ? @sections[section_name] : @sections[:groups][section_name]
            set_pos_y(section[:settings][:posY] || 0) unless section_name.eql?(:body) || section[:settings].nil?
            new_page if @posY < 30

            if section_name.eql? :body and @count % 2 != 0
                @pdf.fill_color "F7F7F7"
                width = @options[:page_layout] == :portrait ? 530 : 770
                @pdf.fill_rectangle [0, @posY+(section[:settings][:height]/2)], width, section[:settings][:height]
            end

            section[:fields].each do |field, settings|
                symbolize! settings[1] unless settings[1].nil?
                set_pos_y settings[1][:posY] unless settings[1].nil? || settings[1][:posY].nil?
                settings = [settings[0], @posY, (@defaults.merge (settings[1] || { }))]
                settings[2][:style] = settings[2][:style].to_sym
                set_options settings[2]

                value = set_value values, settings, section_name, field, group                
                draw_text value, settings
            end
            set_pos_y (section[:settings][:height]) unless section[:settings].nil? || section[:settings][:height].nil?
        end
Generic function to print a section like :body, :page or the group sections.