1. A computer implemented method for automatically extracting metadata from an unstructured electronic document, comprising: converting the unstructured electronic document into a plain text document; extracting, using a rule-based document header extractor, a document header of the unstructured electronic document from the plain text document based on a rule comprising: determining a total number of words in a text line of the plain text document; computing a ratio of the number of words with their initial letters capitalized in the text line over a total number of words in the text line; determining whether the ratio is greater than or equal to a first predetermined header threshold value; if so, declaring the text line as belonging to the document header and repeat the above steps for a next text line in the converted plain text document; if not, declaring the text line as belonging to a main text of the plain text document and repeat the above steps for the next text line of the converted plain text document till a number of main text lines becomes greater than a second predetermined header threshold value; and extracting metadata from the extracted document header using a heuristic approach.