I am using iText to extract text from pdf file, I could able to see the text, however it losing structure of the page
07:53 28 Jun 2019

I am using iText to extract text from the pdf file, I could able to see all text value, but the structure is broken. Could you help me how to extract the text exactly like the pdf file. I've tried some online tool, it does the extraction correctly, what library they are using.

StringBuilder text = new StringBuilder();

if (File.Exists(ofd.FileName))
{
    PdfReader pdfReader = new PdfReader(ofd.FileName);

    for (int page = 1; page <= pdfReader.NumberOfPages; page++)
    {
        //ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
        ITextExtractionStrategy strategy = new LocationTextExtractionStrategy();
        string currentText = PdfTextExtractor.GetTextFromPage(pdfReader, page, strategy);

        currentText = Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.Default, Encoding.UTF8, Encoding.Default.GetBytes(currentText)));
        text.Append(currentText);
    }
    pdfReader.Close();
}
rtxtboxInvoice.Text = text.ToString();
c# pdf itext text-extraction