<commit_before>text findings.classification, :align => :center
text "\n"

font_size(24) { text findings.title, :align => :center }
font_size(18) { 
	text "Critical and High Findings", :align => :center
	text "\n"
	text "This report was prepared by\n#{findings.author}", :align => :center
}
text "\n\n\n"

findings.findings_array_unique.each do |h|
	if h[:values].length > 1
		font_size(24) { 
			fill_color h[:color]
			text h[:title] 
			fill_color "000000"
			}
		
		text "\n"
		
		h[:values].each do |f|
      hosts = Item.find(:all, :conditions => {:plugin_id => f.plugin_id })
      plugin = Plugin.find_by_id(f.plugin_id)
      references = Reference.find(:all, :group => :value, :order => :reference_name, :order => :reference_name, :conditions => {:plugin_id => plugin.id})
						
			font_size(18) { text "#{plugin.plugin_name}\n" }

    	if hosts.length > 1
				text "Hosts", :style => :bold
			else
				text "Host", :style => :bold
			end

			hostlist = Array.new
			hosts.each do |host|
				h = Host.find_by_id(host.host_id)
				hostlist << h.name
			end

			text hostlist.join(', ')

			if f.plugin_output != nil
				text "\nPlugin output", :style => :bold
				text f.plugin_output
			end
		
			if plugin.description != nil
				text "\nDescription", :style => :bold
				text plugin.description
			end
		
			if plugin.synopsis != nil
				text "\nSynopsis", :style => :bold
				text plugin.synopsis
			end			
		
			if plugin.cvss_base_score != nil
				text "\nCVSS Base Score", :style => :bold
				text plugin.cvss_base_score
			end
		
			if plugin.solution != nil
				text "\nSolution", :style => :bold
				text plugin.solution
			end
					
	    if references.size != 0
	      text "\nReferences", :style => :bold
	      references.each { |ref|
	        ref_text = sprintf "%s: %s\n", ref.reference_name, ref.value
	        text ref_text
	      }
				text "nessuspluginid: #{f.plugin_id}"
	    end
				text "\n"
		end
	end
	start_new_page
end<commit_msg>Added a page number and fixed some formatting.<commit_after>text findings.classification, :align => :center
text "\n"

font_size(24) { text findings.title, :align => :center }
font_size(18) { 
	text "Critical and High Findings", :align => :center
	text "\n"
	text "This report was prepared by\n#{findings.author}", :align => :center
}
text "\n\n\n"

findings.findings_array_unique.each do |h|
	if h[:values].length > 1
		font_size(24) { 
			fill_color h[:color]
			text h[:title] 
			fill_color "000000"
			}
		
		text "\n"
		
		h[:values].each do |f|
      hosts = Item.find(:all, :conditions => {:plugin_id => f.plugin_id })
      plugin = Plugin.find_by_id(f.plugin_id)
      references = Reference.find(:all, :group => :value, :order => :reference_name, :order => :reference_name, :conditions => {:plugin_id => plugin.id})
						
			font_size(18) { text "#{plugin.plugin_name}\n" }

    	if hosts.length > 1
				text "Hosts", :style => :bold
			else
				text "Host", :style => :bold
			end

			hostlist = Array.new
			hosts.each do |host|
				h = Host.find_by_id(host.host_id)
				hostlist << h.name
			end

			text hostlist.join(', ')

			if f.plugin_output != nil
				text "\nPlugin output", :style => :bold
				text f.plugin_output
			end
		
			if plugin.description != nil
				text "\nDescription", :style => :bold
				text plugin.description
			end
		
			if plugin.synopsis != nil
				text "\nSynopsis", :style => :bold
				text plugin.synopsis
			end			
		
			if plugin.cvss_base_score != nil
				text "\nCVSS Base Score", :style => :bold
				text plugin.cvss_base_score
			end
		
			if plugin.solution != nil
				text "\nSolution", :style => :bold
				text plugin.solution
			end
					
	    if references.size != 0
	      text "\nReferences", :style => :bold
	      references.each { |ref|
	        ref_text = sprintf "%s: %s\n", ref.reference_name, ref.value
	        text ref_text
	      }
				text "nessuspluginid: #{f.plugin_id}"
	    end
				text "\n"
		end
	end
	start_new_page
end

number_pages "<page> in a total of <total>", [bounds.right - 75, 0]
{'fraction_non_alphanumeric': 0.14012896825396826, 'fraction_numerical': 0.009176587301587302, 'mean_word_length': 2.737720111214087, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7381731', 'n_tokens_mistral': 1676, 'n_tokens_neox': 1363, 'n_words': 366}