So at the moment, I have a PDF I am trying to parse
8:45 9:15 HMI IHMI1 HMI 12:45 12:45 0 MTWRFS MTWRFS
Transit
CarrierSCAC: BPUS Stop Number:
CYT-HMI-S-004 1 Release Type: AUTO
Route Name:
Days to
Pick-up Delivery
Final
Order Due @
Frequency: Frequency:
Carrier Departure Plant Destination Dock Code Initial Dest Location
Carrier Arrival Final Location
Initial Arrival
9:45 10:15 HMI IHMI1 HMI 13:45 13:45 0 MTWRFS MTWRFS
Transit
CYT-HMI-S-005 CarrierSCAC: BPUS Stop Number:1 Release Type: AUTO
Route Name:
Days to
Pick-up Delivery
Final
Order Due @
Frequency: Frequency:
Location
Carrier Arrival Carrier Departure Plant Destination Dock Code Initial Dest Final Location
Initial Arrival
10:45 11:15 HMI IHMI1 HMI 14:45 14:45 0 MTWRFS MTWRFS
Transit
CYT-MAP-S-001 CarrierSCAC: ONEW Stop Number:1 Release Type: AUTO
Route Name:
Days to
Pick-up Delivery
Final
Order Due @
Frequency: Frequency:
Location
Carrier Arrival Carrier Departure Plant Destination Dock Code Initial Dest Final Location
Initial Arrival
13:45 14:15 MAP MAP1 MAP 15:15 15:15 0 MTWRFS MTWRFS
Transit
CarrierSCAC: ONEW Stop Number:
CYT-MAP-S-002 1 Release Type: AUTO
Route Name:
Code I am currently using
<pre>public static void ReadPDF()
{
StringBuilder text = new StringBuilder();
using (PdfReader reader = new PdfReader(@"C:\Users\bwhitt.1.3864\Desktop\CEVA.pdf"))
{
for (int i = 1; i <= reader.NumberOfPages; i++)
{
text.Append(PdfTextExtractor.GetTextFromPage(reader, i));
Debug.Print(text.ToString());
}
}
}
My desired output would be
CYT-HMI-S-004 8:45 9:15 HMI IHMI1 HMI 12:45 12:45 0 MTWRFS MTWRFS
CYT-HMI-S-005 9:45 10:15 HMI IHMI1 HMI 13:45 13:45 0 MTWRFS MTWRFS
CYT-MAP-S-001 10:45 11:15 HMI IHMI1 HMI 14:45 14:45 0 MTWRFS MTWRFS
CYT-MAP-S-002 1 13:45 14:15 MAP MAP1 MAP 15:15 15:15 0 MTWRFS MTWRFS
this is how I would like the data to be shown route number then the line after "inital arrival" How would I do this?
What I have tried:
just tried to extract the pdf and read the lines. That's all I am able to do,